Byte Order Problem

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Byte Order Problem

Post by fmw42 »

Everything may not quite be fixed. I was only looking at the reported endian. see viewtopic.php?f=3&t=20328
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Byte Order Problem

Post by Drarakel »

I know that thread. :wink: But that's a completely different problem (restricted to JPG in TIFF).
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Byte Order Problem

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Byte Order Problem

Post 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.
Last edited by Drarakel on 2012-02-14T11:37:08-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Byte Order Problem

Post 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)!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Byte Order Problem

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Byte Order Problem

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Byte Order Problem

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Byte Order Problem

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: Byte Order Problem

Post by Drarakel »

Thank you!
Post Reply