Skip to main content

Reading 12 bit JPEG data

1 reply [Last post]
diland
Offline
Joined: 2010-08-02

I'm brand new to JAI, and the first stumbling block I've reached is the ability to read in a 12 bit JPEG file. I've seen references to it being possible with JAI, but no code or even suggestions about how it should be done. Could someone please help me out with either a helpful link or a short code snippet?

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
broumbroum
Offline
Joined: 2010-04-24

Try out the ImageIO Tools 1.1 Jpeg Codecs.
That's as simple as [code] ImageIO.read("myFile.jpg") [/code] or [code] ImageIO.getImageReader("myFile.jpg")[/code]. Then you can read all features of your image throughout the ImageReader instance, such as type, sample size, etc.