FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Discussion
   General Processing Discussion
(Moderators: fry, REAS)
   OutOfMemoryError
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: OutOfMemoryError  (Read 370 times)
minh


OutOfMemoryError
« on: Aug 24th, 2004, 9:05pm »

i'm on osX. i'm trying to load in multiple small jpg files. anything more than 30 images will give me the error. each images are around 12k... doesn't seem right...
 
i've searched this forum and there seems to be a solution on the pc side by altering the run.dat file... but what's can i do on the OSX side?
 
fjen

WWW
Re: OutOfMemoryError
« Reply #1 on: Aug 24th, 2004, 9:23pm »

here's the answer ..
 
http://processing.org/discourse/yabb/board_general_action_displ_ay_num_1089402130.html
 
TomC

WWW
Re: OutOfMemoryError
« Reply #2 on: Aug 24th, 2004, 9:55pm »

The images might be around 12k, but if they are compressed (gif, jpg, etc.) then the amount of memory they take up will be much more.  Generally 4bytes per pixel. Also note that doubling the resolution will quadruple the size, e.g. a 320x240 image will take up about 300Kb, but a 640x480 image will take up about 1.2Mb.  30 of those will almost certainly exceed the default memory allocation for an applet running inside a browser.
 
sspboyd


Re: OutOfMemoryError
« Reply #3 on: Aug 24th, 2004, 10:27pm »

I had similar problems on OSX. To get around it I exported the applet and ran it from the command line. By doing this I have been able to load 260 images (800x600, approx 120k/image).
 
I run the exported applet from a shell script:
Code:
#! /bin/bash
# path to folder containing the yoursketch.class.
cd /Applications/Processing\ 69/sketchbook/default/rc6/applet
# start sketch
/usr/bin/java -Xms512m -Xmx512m -classpath .:./rc6.jar BApplet rc6
 

gmail.com w/ sspboyd username
Pages: 1 

« Previous topic | Next topic »