convert with tiff MSB (Motorolla byte order)

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.
Post Reply
L F

convert with tiff MSB (Motorolla byte order)

Post by L F »

Hello! I've noticed a bug long time ago, not only in the current 6.6.0-6. "convert" gives black for tiff source file if it has most-significant byte order. Is it possible to fix recompiling ImageMagick with some special parameters or add some parameter to "convert" command ?

Thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert with tiff MSB (Motorolla byte order)

Post by fmw42 »

You can also specify the 'endian' ordering for binary integers in the format
-endian MSB -endian LSB


see

http://www.imagemagick.org/Usage/formats/#tiff
http://www.imagemagick.org/script/comma ... php#endian
L F

Re: convert with tiff MSB (Motorolla byte order)

Post by L F »

Thanks for the answer. But the option doesn't work for me, the same resulting black square for command
convert -endian MSB -resize 64x64 file1.tiff result.jpeg

In ImageMagick 5.5.7 for example the above command worked (even without endian option) for the same file.

The source file is big endian (MSB), 16-bits, most of values are between in [1926, 2250] range. Looks like ImageMagick doesn't take in account MSB/LSB when converting to 8-bits jpeg.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert with tiff MSB (Motorolla byte order)

Post by fmw42 »

try using IM 6 syntax with the input image right after convert the options following:

convert file1.tiff -endian MSB -resize 64x64 result.jpeg

see

http://www.imagemagick.org/Usage/basics/#cmdline

If that does not work, post a link to your image so others can test it.

What version of IM are you using?
L F

Re: convert with tiff MSB (Motorolla byte order)

Post by L F »

Shifted option doesn't work also.
Source file:http://uploading.com/files/9744ae74/liver_3s000.tiff/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert with tiff MSB (Motorolla byte order)

Post by magick »

ImageMagick is behaving correctly. You need to expand the pixel range before its transformed to 8-bit. Try -normalize or -evaluate multiply 30.
L F

Re: convert with tiff MSB (Motorolla byte order)

Post by L F »

Thanks a lot! "normalize" works.
Post Reply