View Single Post
  #1 (permalink)  
Old 08-07-2007, 06:10 AM
cachi cachi is offline
Member
 
Join Date: Jul 2007
Posts: 40
cachi is on a distinguished road
Help with larger image
I am working on an applet which will apply various transforms to jpgs. I have followed the Tutorial at Processing Image Pixels using Java, Getting Started which is great, and I have a working sample. However, the images I need to work on are 1.5Mb jpg files. When I try to use my working code on one of them, I get an out of memory error. I then saved my jpg as a bitmap, and realised that it expands to about 40Mb, which explains the problem. That is a fair amount of memory for an applet
Now, I understand that I could get my users to increase the amount of memory on the virtual machine, but they aren't clever enough to do that.

I was hoping that there would be some way of taking a smaller chunks of the pixels each time, doing my transform, and putting that data into an image piece at a time so that the whole file is never uncompressed at the same time. Does anyone know if this is possible, and if so how?

Thanks
Reply With Quote
Sponsored Links