Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 866789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:52:02+00:00 2026-05-15T09:52:02+00:00

I am currently working on an image processing demonstration in java (Applet). I am

  • 0

I am currently working on an image processing demonstration in java (Applet).

I am running into the problem where my arrays are too large and I am getting the “java.lang.OutOfMemoryError: Java heap space” error.

The algorithm I run creates an NxD float array where: N is the number of pixel in the image and D is the coordinates of each pixel plus the colorspace components of each pixel (usually 1 for grayscale or 3 for RGB). For each iteration of the algorithm it creates one of these NxD float arrays and stores it for later use in a vector, so that the user of the applet may look at the individual steps.

My client wants the program to be able to load a 500×500 RGB image and run as the upper bound. There are about 12 to 20 iterations per run so that means I need to be able to store a 12x500x500x5 float in some fashion.

Is there a way to process all of this data and, if possible, how?

Example of the issue: I am loading a 512 by 512 Grayscale image and even before the first iteration completes I run out of heap space. The line it points me to is:

Y.add(new float[N][D])

where Y is a Vector and N and D are described as above. This is the second instance of the code using that line.

EDIT: The upper bound, as I mentioned but forgot to correct should be around: 20+ x500x500x5 (20 iterations, 500 width, 500 height, 5 dimensions (where 3 comes from RGB and 2 for the coordinates (The coordinates move and so do the pixels, so I need to record the values, which can and are decimals)) (Approx. 100000000 bytes)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:52:03+00:00Added an answer on May 15, 2026 at 9:52 am

    I don’t think you are going to be able to do this as an Applet. (There may be settings in the browser for how much memory to assign to applets, but I’m not aware of any.)

    If you can use Java webstart, I would use that. You can set the amount of memory required:

    <j2se version="1.4+" initial-heap-size="100M" max-heap-size="200M"/>
    

    The advantage with using webstart is that the user does not need to configure their browser.

    EDIT: The Java control panel does have memory settings for applets. See
    How can I start an Java applet with more memory?

    However, unless you have just a handful of clients who don’t mind altering their java settings (and that they have appropriate permissions and skills), this is not a nice user experience. With web start,you can set all this up in the JNLP descriptor and you’re all set to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a sort of image processing tool that will contain
I'm currently working on a medium-sized web project, and I've ran into a problem.
I'm currently working on a project for medical image processing, that needs a huge
I'm currently working on a web site that will show kind a image gallery
Here's the code I'm currently working with: http://jsfiddle.net/gEMCm/ I'm trying to make an image
Currently working with converting SQLException error messages into messages that are more useful for
I'm currently implementing some image processing code for Android. I'm aware of the memory
I'm currently working on some software which captures your monitor image and sends it
The app that I'm currently working on is supposed to overlay a square image.
Currently working in Java, i'd like to be able to select part of an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.