• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAI- How do i load a high resolution Image??  RSS feed

 
Gaurav Pawar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to load an image and perform some basic transformations on it. The image resolution is 6800*4400.. this i s aJPEG image.
When i execute my program i get the following error message.

Error one factory fails for the operation "jpeg"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
.
.
.
.
.
.

Caused by:java.lang.OutofMemoryError: Java heap space

Has anyone come across this? Please can someone help with this?

Thanks
Gaurav
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So have you used the -XmxNNm Java command-line switch to increase the amount of available Java heap memory?
 
Gaurav Pawar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i am using eclipse.... i have developed a small image viewer app that does rotation , zoom and magnification. Is there a way by which i could increase the Java heap memory from the code itself. The reason being if i decide to run the code on different machine i do not want to execute commands each time.

Thanks in advance,
Gaurav.





>So have you used the -XmxNNm Java command-line switch to increase the >amount of available Java heap memory?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!