We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Writing 16 bit tiffs
Page Index Toggle Pages: 1
Writing 16 bit tiffs (Read 474 times)
Writing 16 bit tiffs
May 19th, 2008, 11:17am
 
Hi there,
I'm trying to save 16 bit tiffs.

I set my color range to 16 bit with colorMode set to 2^16, draw something with accordnig values, and simply save(), but the tif are always refit to 8bit range. How can I save 16 bit values?

Code:

//stupid example:
size(200, 200);
noStroke();
colorMode(RGB, 65535);
fill(23456);
rect(20, 30, 50, 80);
fill(63678);
rect(70, 100, 80, 50);
save("test.tif");


Tnx,
Paolo
Re: Writing 16 bit tiffs
Reply #1 - May 19th, 2008, 1:21pm
 
I don't think processing currently supports more than 8-bit/channel modes I'm afriad. your colorMode just sets the range of values to be converted to 8-bit I believe, so colorMode(RGB,3.0); means that 3.0 is equivalent to 255, or in your case 65535 will equal 255 internally.
Re: Writing 16 bit tiffs
Reply #2 - May 19th, 2008, 2:58pm
 
Damn,
thought so though.

Is there any other format library I can use maybe?
Any workaround?
Can this be implemented in the next release?

Paolo

Re: Writing 16 bit tiffs
Reply #3 - May 19th, 2008, 3:43pm
 
I don't think there's any library that supports high range images unfortunately, and I think it's definitely not trivial thing to implement unfortunately.
Re: Writing 16 bit tiffs
Reply #4 - May 19th, 2008, 4:31pm
 
I see.
I think it would be really useful to add openexr read/write capabilities then.
Can somebody let me know if this is already planned/scheduled?

Otherwise we will consider to do it ourselves.

P.
Re: Writing 16 bit tiffs
Reply #5 - May 19th, 2008, 6:34pm
 
I would look at Java Advanced Imaging, but I don't know if they actually support this.

Otherwise, Google --> tiff java
Page Index Toggle Pages: 1