Skip to content
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

Fix resolution reporting for odd-sized images with a clap box #762

Conversation

dreifachstein
Copy link

@dreifachstein dreifachstein commented Jan 12, 2023

A 15x15 sample image:
15x15.heic.zip

@dreifachstein dreifachstein changed the title Fix image resolution reporting when clap offsets are non-integral Fix resolution reporting for odd-sized images with a clap box Jan 12, 2023
@farindk
Copy link
Contributor

farindk commented Jan 18, 2023

Thanks for the example file. I'm currently having a look at the problem.
Did you notice that the ispe box of the input also contains a wrong size (16x16):

| | | Box: ispe -----
| | | size: 20   (header size: 12)
| | | version: 0
| | | flags: 0
| | | image width: 16
| | | image height: 16
| | | 
| | | Box: clap -----
| | | size: 40   (header size: 8)
| | | clean_aperture: 15/1 x 15/1
| | | offset: -32768/65536 ; -32768/65536

How was this file generated?

@farindk
Copy link
Contributor

farindk commented Jan 18, 2023

i've corrected this with a simpler patch. Please see above.
No idea why it was done so complicated in the original source...

@dreifachstein
Copy link
Author

Thanks for the example file. I'm currently having a look at the problem. Did you notice that the ispe box of the input also contains a wrong size (16x16):

| | | Box: ispe -----
| | | size: 20   (header size: 12)
| | | version: 0
| | | flags: 0
| | | image width: 16
| | | image height: 16
| | | 
| | | Box: clap -----
| | | size: 40   (header size: 8)
| | | clean_aperture: 15/1 x 15/1
| | | offset: -32768/65536 ; -32768/65536

How was this file generated?

The file was generated by the mac os image preview tool and the image size in ispe matches the decoder output.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants