diff --git a/coders/tiff.c b/coders/tiff.c
index ca423d7..aafae4d 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -825,7 +825,6 @@
size_t
length,
- lsb_first,
pad;
ssize_t
@@ -1004,9 +1003,6 @@
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"Image depth: %.20g",
(double) image->depth);
- lsb_first=1;
- image->endian=MSBEndian;
- if ((int) (*(char *) &lsb_first) != 0)
if ((photometric == PHOTOMETRIC_MINISBLACK) ||
(photometric == PHOTOMETRIC_MINISWHITE))
image->colorspace=GRAYColorspace;
@@ -2558,8 +2554,7 @@
i;
size_t
- length,
- lsb_first;
+ length;
ssize_t
y;
@@ -2875,10 +2870,6 @@
break;
}
}
- lsb_first=1;
- image->endian=MSBEndian;
- if ((int) (*(char *) &lsb_first) != 0)
- image->endian=LSBEndian;
if ((compress_tag == COMPRESSION_CCITTFAX3) &&
(photometric != PHOTOMETRIC_MINISWHITE))
{
@@ -3152,6 +3143,7 @@
quantum_info->endian=LSBEndian;
if (endian == FILLORDER_LSB2MSB)
quantum_info->endian=MSBEndian;
+ image->endian=quantum_info->endian;
pixels=GetQuantumPixels(quantum_info);
tiff_info.scanline=GetQuantumPixels(quantum_info);
switch (photometric)
@@ -3391,9 +3383,6 @@
if (0 && (image_info->verbose == MagickTrue))
TIFFPrintDirectory(tiff,stdout,MagickFalse);
(void) TIFFWriteDirectory(tiff);
- image->endian=MSBEndian;
- if (endian == FILLORDER_LSB2MSB)
- image->endian=LSBEndian;
image=SyncNextImageInList(image);
if (image == (Image *) NULL)
break;