Also try to keep your textures in a size just enough for your work.
Do not use a 2048x2048 texture size where a smaller 256x256 can do the job.
Alessandro
Paul Gordon <[EMAIL PROTECTED]> wrote:
Thierry Milard wrote:
>Hello java3D friends.
>I happened to be stuck in a OutOfMemory error when I read an image file with a
>Texture loader.
>Description
>- I have a lot of Memory availlable on my machine. I mean it's not a physical
>memory problem.
>- My 10 images/jpeg files are stored in a zip file and are read all at once.
>- I get a memory error on the fifth image. God knows why
>- I tested my program with another zip file (different images).... bigger ones
>... and I had no memory error (?).
>
>
Have you assigned the JVM a larger maximum heap than the default
(generally 128MB?). Try adding -Xmx256M to give it twice as much
maximum memory, etc.. If another set of images loads fine by default,
there may be a difference in how well they are compressed, or the number
of colours, who kn ows, that tip those particular images over the top
while the others are okay.
>Strange no ? If you have an hint.
>Thierry, Paris
>
>Ps: Here is a bit of the code;
>
> ZipEntry inputEntry = zipFileDatas.getEntry(nomTexture);
> InputStream inputStream = zipFileDatas.getInputStream(inputEntry);
> BufferedImage uneBuffImg = ImageIO.read(inputStream);
> TextureLoader textLoad = new TextureLoader(uneBuffImg);
>
> //This bloody line gives me grey hair:
> ImageComponent2D textImage = textLoad.getImage();
>
> Texture2D texture = new Texture2D(......, textImage);
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".