Page 2 of 2

Re: Byte Order Problem

Posted: 2012-02-13T13:43:50-07:00
by fmw42
Everything may not quite be fixed. I was only looking at the reported endian. see viewtopic.php?f=3&t=20328

Re: Byte Order Problem

Posted: 2012-02-13T14:27:59-07:00
by Drarakel
I know that thread. :wink: But that's a completely different problem (restricted to JPG in TIFF).

Re: Byte Order Problem

Posted: 2012-02-13T14:33:29-07:00
by fmw42
Drarakel wrote:I know that thread. :wink: But that's a completely different problem (restricted to JPG in TIFF).
Yes, I was just pointing out there may still be other problems.

Re: Byte Order Problem

Posted: 2012-02-14T07:18:51-07:00
by Drarakel
Strange. With IM v6.7.5-6 Q16 Win32, the "tiff:endian" output in "identify -verbose" is still not there.

Which libtiff version are you using, Fred? Maybe it has something to do with the different libtiff versions in the Windows binaries. (Though, in both v6.7.3-6 AND v6.7.3-7, libtiff is reported here as 4.0.0beta7.)

With IM v6.7.3-6:

Code: Select all

convert rose: tif:- | identify -format "%[tiff:*]" tif:-
tiff:document=R:/Temp/magick-puJ6ytoY
tiff:endian=lsb
tiff:photometric=RGB
tiff:rows-per-strip=39

With IM v6.7.3-7 or newer:

Code: Select all

convert rose: tif:- | identify -format "%[tiff:*]" tif:-
tiff:document=R:/Temp/magick-JNEhtr-i
tiff:photometric=RGB
tiff:rows-per-strip=39

Of course, that's only a small 'problem'. (I just supported the request from "markzman".)

Edit: Corrected a typo in one version number.

Re: Byte Order Problem

Posted: 2012-02-14T10:50:38-07:00
by fmw42
On IM 6.7.5.6 Q16 Mac OSX Snow Leopard

tiffinfo
LIBTIFF, Version 3.9.5



convert rose: rose.tiff
c-98-234-217-52:~ fred$ identify -verbose rose.tiff
Image: rose.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 70x46+0+0
Resolution: 72x72
Print size: 0.972222x0.638889
Units: Undefined
Type: TrueColor
Base type: TrueColor
Endianess: MSB
Colorspace: sRGB
Depth: 8-bit
....
Properties:
date:create: 2012-02-14T09:46:42-08:00
date:modify: 2012-02-14T09:46:42-08:00
signature: a698f2fe0c6c31f83d19554a6ec02bac79c961dd9a87e7ed217752e75eb615d7
tiff:document: rose.tiff
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 39


So your version of libtiff is higher than mine and appears to be a beta.

You may be onto it as having to do with libtiff

However, as highlighted above there is a conflict in what IM reports as the endian (MSB) and what the tiff properties reports as the endian (LSB)!

Re: Byte Order Problem

Posted: 2012-02-14T10:57:03-07:00
by magick
The tiff:endian property is the endianess of the image container. The endian property is the endianess of the image pixels. They may differ.

Re: Byte Order Problem

Posted: 2012-02-14T11:40:24-07:00
by Drarakel
Exactly - your output is completely correct, Fred.
fmw42 wrote:So your version of libtiff is higher than mine and appears to be a beta.
Yeah, it's higher. But as I said - the change of the output (in Windows) came between v6.7.3-6 and v6.7.3-7, and both versions appear to have the same libtiff. I don't understand that.
The libtiff version in the current (Win32) binaries is 4.0.0 (without beta) by the way.

Re: Byte Order Problem

Posted: 2012-02-14T12:13:47-07:00
by fmw42
checking with your command to see if there is any differences that way (though there should not).

convert rose: tif:- | identify -format "%[tiff:*]" tif:-tiff:document=/var/folders/Yy/YyU-87D4F+OjlYS1BLMfS++++TM/-Tmp-/magick-P4DcSvip
tiff:endian=lsb
tiff:photometric=RGB
tiff:rows-per-strip=39

So I get tiff:endian either way.


Sorry, my libtiff came from MacPorts which is still at 3.9.5. So I cannot upgrade to test 4.0.0.

Perhaps some other windows user can test this to see if they can confirm your results with libtiff at 3.9.5 or 4.0.0

Re: Byte Order Problem

Posted: 2012-02-14T12:46:36-07:00
by magick
We need to set a define for Windows for the TIFF coder to pick up the endian attribute. We'll add a patch in the next point release of ImageMagick.

Re: Byte Order Problem

Posted: 2012-02-14T13:48:11-07:00
by Drarakel
Thank you!