libheif
libheif copied to clipboard
ignore_transformations does not ignore AVIF clap
Test image: kimono.crop.avif (see: https://github.com/link-u/avif-sample-images) This picture has a clear aperture (clap) definition. 'clap' provides cropping and offset instructions, so it does not render the entire image.
decode_options = heif_decoding_options_alloc(); decode_options->ignore_transformations=true;
Setting ignore transformations should ignore the 'clap'. But it doesn't. This only seems to be an issue with AVIF and not HEIF/HEIC.
The ignore_transformations option is a hack anyway. There is little reason to use it at all. What is the reason you need to set this flag?
If we want to have low-level access to the raw images (e.g. for single tile decoding in grid images), we probably need a special API for this.
Sorry for the long delay. Just noticed this was waiting for feedback.
I agree, transformations are a hack. I'm trying to make sure that I can decode the entire picture. Theoretical example: you have a missing person and someone has used 'clap' to crop it to just show the person. I want to view the entire uncropped picture since it may have clues about the location. If there is a 'clap', then I want to render the image without the cropping/offset (show me the entire picture).
What is the reason you need to set this flag?
One of the reason is heic files without irot
box but with rotation in exif. In this case macOS rotates images regardless of irot
box. Disabling transformations is the easiest way to be in line with macOS and every other image format.