GNOME Bugzilla – Bug 81702
not loading tiffs right on LE box
Last modified: 2010-07-10 04:05:10 UTC
loading a BE tiff on a LE (PPC) box, it gets some of the colors wrong. (see attached image)
Created attachment 8445 [details] screenshot of eog
Could you verify if this also occurs with older versions of io-tiff.c ? The reason I'm asking is that I changed the latest version (1.32) to directly copy stuff into the pixbuf instead of dumping it into a separate buffer and copying individual samples with TIFFGet[RGBA]. But since then I've found some hints in the libtiff mailing list and bugzilla which seem to indicate that the actual sample order used by the TIFFRGBAImage API depends on the host endianness.
actually i always get endianness wrong, and the PPC is BE isn't it? i'll look at this tonight, thanks.
yep, updating to 1.31 and reinstalling the tiff loader makes it work.
Ok, I'll look into fixing this. Simply reverting to 1.31 is not good, since there is a number of robustness fixes in 1.32 in addition to the problematic change.
Would you mind testing if the following patch (against io-tiff.c 1.32) works on PPC ?
Created attachment 8520 [details] [review] the patch
i tested this patch on x86 linux and ppc mac os with both LE and BE tiffs, and it works.