How to convert TIFF-16 Bits to TIFF-12 Bits

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Arkon

How to convert TIFF-16 Bits to TIFF-12 Bits

Post by Arkon »

Maybe this is a Newbie question, but I'm a newbie, so...

I have a bundle of .tiff images that are 16 bits or 8 bits and I need them all to be 12 bits.

If necessary I can separate the 16 and the 8 bits...

Can someone help me?

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to convert TIFF-16 Bits to TIFF-12 Bits

Post by magick »

To convert 16-bit TIFF images to 12-bit:
  • convert image.tif -depth 12 image-12.tif
Arkon

Re: How to convert TIFF-16 Bits to TIFF-12 Bits

Post by Arkon »

First of all, thanks for the help, but I'm still having some sort of problem with my images.

When I try to convert the image using the line you showed me it gets all garbled.

I'm wondering if there is something special about my images.

An example of the original images: http://lapimo.sel.eesc.usp.br/lapimo/Test.tif

When I try to convert with "convert Test.tif -depth 12 Test_12.tif" I get this message:
"
convert: Test.tif: unknown field with tag 317 (0x13d) encountered. `TIFFReadDirectory'.
convert: Test.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: Test.tif: unknown field with tag 37458 (0x9252) encountered. `TIFFReadDirectory'.
convert: Test.tif: unknown field with tag 37459 (0x9253) encountered. `TIFFReadDirectory'.
convert: Test.tif: unknown field with tag 37460 (0x9254) encountered. `TIFFReadDirectory'.
convert: Test.tif: unknown field with tag 37461 (0x9255) encountered. `TIFFReadDirectory'.
convert: incorrect count for field "ColorMap" (768, expecting 196608); tag ignored. `Test.tif'.
"

And the result is: http://lapimo.sel.eesc.usp.br/lapimo/Test_12.tif

If it would help I'm using Windows XP, the Test.tif image is a 14 bits image and I have absolutely no idea what could be the problem...

Thanks
Post Reply