2006.04.01 04:44 "[Tiff] WORDS_BIGENDIAN makes libtiff platform dependent (3.8.2) and you have to undefine it on MacTel", by ping shu

2006.04.02 22:16 "Re: [Tiff] WORDS_BIGENDIAN makes libtiff platform dependent (3.8.2) and you have to undefine it on MacTel", by ping shu

--- Joris <joris.at.lebbeke@skynet.be> wrote:

Still, one option is to detect it in the code by writing something to a word and reading back its first byte...

One exampel of run-time detection:

New code 3.8.2:

#ifdef WORDS_BIGENDIAN
  tif->tif_header.tiff_magic = tif->tif_flags &
TIFF_SWAB
    ? TIFF_LITTLEENDIAN: TIFF_BIGENDIAN;
#else
  tif->tif_header.tiff_magic = tif->tif_flags &
TIFF_SWAB
    ? TIFF_BIGENDIAN: TIFF_LITTLEENDIAN;
#endif

Old code 3.5
  tif->tif_header.tiff_magic = tif->tif_flags &
TIFF_SWAB
    ? (bigendian? TIFF_LITTLEENDIAN: TIFF_BIGENDIAN)
    : (bigendian? TIFF_BIGENDIAN:
TIFF_LITTLEENDIAN);
-------------

I think the old one is better. Mactel used to like the 3.5 libtiff.

Ping

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com