libheif icon indicating copy to clipboard operation
libheif copied to clipboard

ignore_transformations does not ignore AVIF clap

Open hackerfactor opened this issue 4 years ago • 3 comments

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.

hackerfactor avatar Jul 14 '20 15:07 hackerfactor

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.

farindk avatar Sep 21 '20 13:09 farindk

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).

hackerfactor avatar Dec 02 '20 15:12 hackerfactor

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.

homm avatar Oct 14 '21 20:10 homm