Page 1 of 1

Writing tiff files with depth different than 8 and 16

Posted: 2015-07-13T09:03:14-07:00
by jsanterre
Hi there,

I was able to write tiff files with bit depth of 8 and 16, both using Magick++ (6.9.1-4) and from the command line (6.9.1-1) and view those images using other image viewers (Nuke, Paint.Net, Autodesk Maya built-in image viewer and Gimp).

I was also able to write tiff files with bit depth of say, 5, 7, 11 and 13, both using Magick++ (6.9.1-4) and from the command line (6.9.1-1). When trying to view those images using the software from above, I have either weird results or error messages (from Nuke: Sorry, cannot handle images with 7 bit samples.) Of course, when I use ImageMagick imdisplay, the image looks fine.

My concern is that I was not able to view images written by IM with bit depth different than 8 and 16 with any other image viewers. Of course, I know you are not responsible for other software not handling the files written by IM. But beside ImageMagick imdisplay, would it be possible for you to give me the name of one software that would handle tiff images written by ImageMagick with bith depth of say, 7?

Here's the command I use from command line (same results as with Magick++)

Code: Select all

convert bird.tiff -depth 7 bird7_out.tiff


here's a sample image:
https://www.dropbox.com/s/qtrjbd303e8yi ... .tiff?dl=0

and here's the result I got:
https://www.dropbox.com/s/pa7z5ws6umn1n ... .tiff?dl=0

Thank you very much for your help!

Julie

Re: Writing tiff files with depth different than 8 and 16

Posted: 2015-07-13T12:08:06-07:00
by snibgo
I don't know of any software that can read TIFF images with depth other than 8 or 16. But, then, I didn't know IM could write TIFF with depth 7 or 6 or other weird numbers. I'm still learning!

I am curious. Why do you want to use these bit depths?

Re: Writing tiff files with depth different than 8 and 16

Posted: 2015-07-13T12:11:53-07:00
by fmw42
Does it make any sense to create the 7 or 6 bit depth images in IM. Then convert to 8 or 16 and auto-level the images so that the graylevels stretch to full dynamic range of 8 or 16, but only have 7 or 6 bit depth equivalent number of values.

Re: Writing tiff files with depth different than 8 and 16

Posted: 2015-07-13T12:30:45-07:00
by jsanterre
Thanks for your replies!

Here's the reason why I'm interested in those bit depths. I'm developing a lightweight image and video processing tool and I'm currently adding support for different image bit depths. So at the end, I'm not the one who might use those numbers. I simply want my software to be as flexible as possible... Maybe I should stick with bit depth of 8 or 16...

Thanks Fred for the idea. I will need to investigate/try this out and will keep you posted on what we decided to do.

Have a great day!

Julie