Align pixel orientation with exif:Orientation in HEIC decoder (#1233)
* Align pixel orientation with exif:Orientation in HEIC decoder
It turns out that in HEIC the pixels are never rotated and the metadata only
indicates the orientation of the sensor when the photo was taken.
Hence, there was a discrepancy between `Image->orientation` and actual pixel
orientation in images loaded with the `heic` coder. Particularly, this led to
incorrect behavior of the `-auto-orient` which in this case tried to compensate
non-existing pixel rotation.
MagickWand/drawing-wand.c: resolve several null pointer dereferences
found by cppcheck
[MagickWand/drawing-wand.c:177] -> [MagickWand/drawing-wand.c:175]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
[MagickWand/drawing-wand.c:4540] -> [MagickWand/drawing-wand.c:4538]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
[MagickWand/drawing-wand.c:4682] -> [MagickWand/drawing-wand.c:4680]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
Ilya Shipitsin [Thu, 30 Aug 2018 10:16:20 +0000 (15:16 +0500)]
resolve several null pointer dereferences
found by cppcheck
[MagickCore/draw.c:881] -> [MagickCore/draw.c:879]: (warning) Either the condition 'draw_info!=(DrawInfo*)NULL' is redundant or there is possible null pointer dereference: draw_info.
[MagickCore/fx.c:3966] -> [MagickCore/fx.c:3964]: (warning) Either the condition 'image!=(Image*)NULL' is redundant or there is possible null pointer dereference: image.
[MagickCore/fx.c:5009] -> [MagickCore/fx.c:5006]: (warning) Either the condition 'right_image!=(const Image*)NULL' is redundant or there is possible null pointer dereference: right_image.
[MagickCore/montage.c:168] -> [MagickCore/montage.c:166]: (warning) Either the condition 'montage_info!=(MontageInfo*)NULL' is redundant or there is possible null pointer dereference: montage_info.
[MagickCore/montage.c:416] -> [MagickCore/montage.c:415]: (warning) Either the condition 'master_list==(Image**)NULL' is redundant or there is possible null pointer dereference: image_list.
[MagickCore/nt-base.c:1792] -> [MagickCore/nt-base.c:1797]: (warning) Either the condition 'entry!=(DIR*)NULL' is redundant or there is possible null pointer dereference: entry.
[MagickWand/drawing-wand.c:177] -> [MagickWand/drawing-wand.c:175]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
[MagickWand/drawing-wand.c:4540] -> [MagickWand/drawing-wand.c:4538]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
[MagickWand/drawing-wand.c:4682] -> [MagickWand/drawing-wand.c:4680]: (warning) Either the condition 'wand!=(DrawingWand*)NULL' is redundant or there is possible null pointer dereference: wand.
[coders/msl.c:575] -> [coders/msl.c:555]: (warning) Either the condition 'image==(Image*)NULL' is redundant or there is possible null pointer dereference: image.
Ilya Shipitsin [Thu, 30 Aug 2018 06:55:46 +0000 (11:55 +0500)]
MagickCore/constitute.c: resolve possible null pointer dereference
found by cppcheck
[MagickCore/constitute.c:1074] -> [MagickCore/constitute.c:1071]: (warning) Either the condition 'image!=(Image*)NULL' is redundant or there is possible null pointer dereference: image.