-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Files with shared auxiliary images fail to parse #1147
Comments
It looks like we just need to add the auxiliary image to each of the parents. Might be some complexity with loop detection, but will check that. One question before I look to PR this: would it make more sense to have the |
Good question. It would only be possible under the While I think the intent of the writer is relatively clear if you let the I think it's fine to support reading files that have an |
The same issue might also be present for shared metadata and shared thumbnails. Creating a file with shared EXIF payloads seems to result in the following error from ImageMagick: |
@leo-barnes Can you share those additional test files? |
Attached a file that shares alpha, thumbnail and XMP between the two main images in an |
I've got it to a "less broken" stage:
and ImageMagick is more on-board with this:
The alpha still isn't properly assigned to the second image. Need to go again on the scaling. |
Have updated the implementation.
|
Filing issue to document email thread with @farindk.
ImageMagick is rejecting some prototype files that I have been creating with the following error:
identify: Invalid input: Unspecified: Too many auxiliary image references (2.0) `file_with_shared_alpha.heic' @ error/heic.c/IsHEIFSuccess/142.
The error is coming from libheif rather than ImageMagick itself. The file in question has two main images (in an 'altr' group) that share an alpha auxiliary image. To me this should be perfectly valid and makes a lot of sense once you start creating files containing 'altr' groups, but I can see why this would be unexpected for simpler files.
The conclusion from the thread is that there is nothing in the spec that explicitly forbids sharing the same auxiliary image between multiple main images and that the restriction in libheif should probably be relaxed. ISOBMFF says that all irefs of a specific type from a source item should be collected into a single ItemReferenceBox, so having multiple irefs is not really an option.
file_with_shared_alpha.heic.zip
The text was updated successfully, but these errors were encountered: