Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2007, 05:10 AM
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 08:59 AM
Member
 
Join Date: Jul 2007
Posts: 35
silvia is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
Image denoising sharonpriya Advanced Java 0 12-17-2007 11:04 AM
how to set an image size valery New To Java 1 08-06-2007 09:27 PM
2D Array to image fred Java 2D 1 07-24-2007 02:52 AM
Image Verification peiceonly Java Servlet 1 04-27-2007 05:50 PM


All times are GMT +3. The time now is 01:29 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org