views:

250

answers:

0

I have an application that uses JAI to process images. It takes TIFF files, reads them, wraps the content into a SeekableStream then uses JAI.create to create the PlanarImage.

What I want to do is change the source from TIFF files to a component, which already exists, and which serves me the image data in the form of a raster stored in a byte array. I know the format of the raster data (width, height, bits per sample etc.).But I can't find a way to create a PlanarImage for JAI in the same way as before.

My only idea is to create a java.awt.Image from the raster and use that with JAI.create. Is this OK, or is there a better solution?