Skip to main content

convert a large image to jpeg2000

2 replies [Last post]
toabey
Offline
Joined: 2009-04-22

I have a large raw image file. I am reading portion by portion (rectangular ) as bufferedimage and then displaying it unitil the entire image is displayed (scrolled) .

Is it possible to convert each rectangular buffered image to jpeg/jpeg2000 and appending it to the single jpeg/jpeg2000 file.

I want to convert that entire raw file into a single jpeg/jpeg2000 file .

Is it possible , then how?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
toabey
Offline
Joined: 2009-04-22

Let my question be more specific..

Using ImageIO which option is possible ...

1. to convert buffered images(in my case portions of a single image) to mutiple code streams using j2kimagewriter.

OR

2. to convert buffered images(in my case portions of a single image) to mutiple Tiles using j2kimagewriter.

later decode this mutiple streams/tiles and show it as a single image?

Ideally I want the second option..but it seems to be not possible?
please help !...

toabey
Offline
Joined: 2009-04-22

Atlast i was able to do it, by extending tiledimage override getTile method with a semaphore acquire to wait for the data to arrive.

ImageRead is done on a seperate thread.so in main thread data is loading using rawimage inputstream and subsampled..and using format Operator it is converted into another samplemodel, calls the getTile of the Formatted planarImage. Then incremented the semaphore count so jpeg2000 conversion can be continued.