Page 1 of 1
convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T07:34:33-07:00
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.
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T08:55:42-07:00
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
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T10:23:31-07:00
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.
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T10:54:12-07:00
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?
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T11:24:30-07:00
by L F
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T11:57:07-07:00
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.
Re: convert with tiff MSB (Motorolla byte order)
Posted: 2010-03-22T12:03:06-07:00
by L F
Thanks a lot! "normalize" works.