We're Hiring!

using Bio-Formats to read a 12 bit grayscale lossless .jpg

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

using Bio-Formats to read a 12 bit grayscale lossless .jpg

Postby mbrandt_nasa » Wed Sep 25, 2013 6:50 pm

Hi,

Is it possible to use Bio-Formats to read in a 12 bit grayscale lossless .jpg image file into Java, into a BufferedImage?

It's not clear to me if Bio-Formats would support that.

Any hints would be appreciated.

thanks
mbrandt_nasa
 
Posts: 2
Joined: Wed Sep 25, 2013 6:41 pm

Re: using Bio-Formats to read a 12 bit grayscale lossless .j

Postby mbrandt_nasa » Wed Sep 25, 2013 7:30 pm

If I try to run:

JPEGReader jr = new JPEGReader();
try
{
jr.setId("images/b0958620.jpg");
int bits = jr.getBitsPerPixel();
System.out.println("Bits per pixel: " + bits);
...
I get:

sun.awt.image.ImageFormatException: Unsupported JPEG data precision 12

Does this mean that Bio-Formats does not support 12 bit gray scale JPEG images? I thought that this is a common medical image format, so I would think that it would support it?

Thanks for any idea...
mbrandt_nasa
 
Posts: 2
Joined: Wed Sep 25, 2013 6:41 pm

Re: using Bio-Formats to read a 12 bit grayscale lossless .j

Postby mlinkert » Thu Sep 26, 2013 11:11 pm

Which version of Bio-Formats are you using? If you haven't already, I would suggest trying 5.0.0-beta1 (from http://www.openmicroscopy.org/site/prod ... io-formats), as that includes enhanced JPEG support.

If neither the current stable version (4.4.8) nor 5.0.0-beta1 can open the file, then it would be very helpful if you could upload an example to:

http://qa.openmicroscopy.org.uk/qa/upload/
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest