-
-
Notifications
You must be signed in to change notification settings - Fork 351
text: add extended language property support #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
86fb4ca
to
18bb58d
Compare
Yes, I can understand that. My first intuition would be to also use Another point: I would move all logic from the If you want, I can merge this and do the refactoring. Or you may do it if you prefer. Just let me know. |
Outside of specification conformance, I can think of a case where you might want to use it in a layered image, where the base layer is a photograph and there is a derived image using that base plus a selected labelling layer (with alpha) composited over the base layer. @dukesook have you looked at a photomap use case? |
This may even be useful without a layered composition. I often have to handle software screenshots for different UI languages. These could then be combined into one file. For such a use, it might make sense to use an "alternative group" ( |
So I think we should allow for that. If you agree, I will update the interface to use a |
Ok. |
Sorry, no. I'm not familiar with this. |
libheif/api/libheif/heif_text.cc
Outdated
if (auto img = text_item->context->get_image(text_item->text_item->get_item_id(), false)) { | ||
auto existing_elng = img->get_property<Box_elng>(); | ||
if (existing_elng) { | ||
return {heif_error_Usage_error, heif_suberror_Invalid_parameter_value, "item already has an elng property"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about replacing the existing elng
?
Currently, we do not allow editing existing files, but if we will, replacing the value would be the expected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally tried removing the existing elng
and adding a new one. That turned out to be very messy because it requires updating the property associations.
So I made the choice to update the text. However it might be unexpected that updating the text could affect another item with the same original text (because de-duplication).
18bb58d
to
a1de57a
Compare
I went back-and-forward a bit on whether adding and getting should take the item or the item id. Would appreciate feedback on that.