Results 1 to 2 of 2
Thread: Help with larger image
- 08-07-2007, 04:10 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
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
- 08-07-2007, 07:59 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 35
- Rep Power
- 0
A quick solution would be to create a dot bat file, which would start the program and increase the memory of the virtual machine, so that the user can just click it, it will work like a short cut.
You can break the image up into bytes, take maybe 100 bytes at a time re-build the image each time and then performing your operation.
Similar Threads
-
Image denoising
By sharonpriya in forum Advanced JavaReplies: 2Last Post: 02-14-2011, 06:01 AM -
Image Verification
By peiceonly in forum Java ServletReplies: 2Last Post: 04-04-2009, 07:38 AM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM -
how to set an image size
By valery in forum New To JavaReplies: 1Last Post: 08-06-2007, 08:27 PM -
2D Array to image
By fred in forum Java 2DReplies: 1Last Post: 07-24-2007, 01:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks