Skip to content

Commit

Permalink
Fix missing 'tiff:endian' image property (#347)
Browse files Browse the repository at this point in the history
`HAVE_TIFFISBIGENDIAN` macro was removed in
d0b6b48, but the macro was still used
for a conditional block in `tiff.c` responsible for setting the
`tiff:endian` image property. The macro was never set, essentially
disabling this functionality.

We can safely remove the conditional compilation and assume
`TIFFIsBigEndian` is always available: we require at least libtiff
4.0.0, while `TIFFIsBigEndian` was added in 3.7.0.
  • Loading branch information
Matoking authored Nov 6, 2024
1 parent 188dff1 commit 565cba5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions coders/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,6 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
image->endian=MSBEndian;
if (endian == FILLORDER_LSB2MSB)
image->endian=LSBEndian;
#if defined(MAGICKCORE_HAVE_TIFFISBIGENDIAN)
if (TIFFIsBigEndian(tiff) == 0)
{
(void) SetImageProperty(image,"tiff:endian","lsb");
Expand All @@ -1352,7 +1351,6 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
(void) SetImageProperty(image,"tiff:endian","msb");
image->endian=MSBEndian;
}
#endif
if ((photometric == PHOTOMETRIC_MINISBLACK) ||
(photometric == PHOTOMETRIC_MINISWHITE))
image->colorspace=GRAYColorspace;
Expand Down

0 comments on commit 565cba5

Please sign in to comment.