Results 1 to 6 of 6
  1. #1
    mr_empty is offline Member
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default read image without bufferedimage

    hi all,

    i wonder if anyone know how to read an image without using bufferedimage, or planarimage, just read into stream, and processing it,and export it as file...
    the situation is i load four images and process them, but i dun have enough memory to go through the step, so... what else can u all suggest? thanks!!

  2. #2
    JxAxMxIxN is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    Are they really big image files?

  3. #3
    mr_empty is offline Member
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by JxAxMxIxN View Post
    Are they really big image files?
    actually they are totaly just few hundreds mbs, and when i load them,combine and process, the buffer exceeds the maximum amount of heap space...

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default

    Are they compressed files (JPEG, for example), and still hundreds of Mb in total?

  5. #5
    JxAxMxIxN is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by mr_empty View Post
    actually they are totaly just few hundreds mbs, and when i load them,combine and process, the buffer exceeds the maximum amount of heap space...
    Could you try to process 1 or 2 at a time and then dump the unnecessary data?

  6. #6
    JxAxMxIxN is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    How about converting your images into arrays (which can be done rather quickly) and dumping your original buffered image (do this one by one), then processing them...
    There's an example of the conversion in this quick program I wrote located in the "Not Getting Enough FPS" post in this Java 2D forum.
    Of course it's just an idea, you'll have to do all the rest of the hard work... And I don't know the limitations of array sizes either... Worth a shot!!!

Similar Threads

  1. Read and draw a local image.
    By ichwar in forum New To Java
    Replies: 1
    Last Post: 07-27-2009, 02:02 PM
  2. Replies: 1
    Last Post: 04-06-2009, 05:06 AM
  3. how to read an image and display
    By santhosh_el in forum AWT / Swing
    Replies: 2
    Last Post: 04-04-2009, 12:43 PM
  4. Replies: 0
    Last Post: 07-02-2008, 08:06 PM
  5. How to read an image in Java
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-25-2008, 10:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •