Originally Posted by
copeg
When you say 48bit images, do you mean 16 bit for each color (R/G/B)?
Yes.
Take a look at the SampleModel and ColorModel classes (see
Learning Java 2D, Part 2 ) which should allow you to customize how the image data is represented.
I had a look there before:
Images may use one of several subclasses of ColorModel in the Java 2D API libraries:
A ComponentColorModel, in which a pixel is represented by several discrete values, typically bytes, each representing one component of color, such as the red component of an RGB representation
A DirectColorModel, in which all components of a color are packed together in separate bits of the same single pixel value
An IndexColorModel, in which each pixel is a single value representing an index into a palette of colors
The ComponentColorModel would probably be the most appropriate, but how du you use it? What is a subclass (I'm new to this, remember)
However:
For the image-type parameter, use one of the BufferedImage constants shown in Table 1, which specifies how the image data is stored for each of its pixels.
None of those describe anything that remotely resebles 3 x 16 bit data. I believe this is where I lose touch. To use BufferedImage I have to use one of those constants (?) unless I make a custom (?) bufferedimage. But how? Do I write custom methods for custom ColorModel objects and then instantiate them by something like BufferedImage.ColorModel = new MyColourModel()? I really feel I'm out on a limb here. Naively I thought this would be a routine hack but maybe it's not so common with 48 bit applications.