*
The moose likes Other JSE/JEE APIs and the fly likes loading  large image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "loading  large image file " Watch "loading  large image file " New topic
Author

loading large image file

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Hi,
I use this code to load images:


this code works ok for medium size images .but when i tried to get Image with about 3 MB or higher , nothing happens !

how can i solve this issue ?

thanks
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

I seem to recall that Toolkit loads images asynchronously so you have to use MediaTracker to see if the image is fully loaded.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

ImageIO.read is another method for loading images. since it also doesn't load asynchronously.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

I need your help guys to load some photo images taken with a digital camera

you can find one sample photo jpeg image here : http://www.myjavaserver.com/~othmanelmoulat/IMGP0259.JPG

what i need is to load these photos , resize them and display them in JLabel using JLabel(new ImageIcon())


i tried all solutions you suggested in this post without luck !
i also tried using jimi and imagero (imgero a robust commercial java imaging library) to load the photos ; but nothing worked !!
there is something strange with these photos ! i don't know what is it.
i even don't get any debug info eventhough i added many debug lines to see if i reach the code for loading image and resizing..
this is a mystery i need to figure out .
do you have any idea how i can read these photos , resize them into small thumbnails and display them inside a JLabel ?

i would appreciate a lot any help .
[ June 11, 2008: Message edited by: omar Bakr ]
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Ok i solved the problem guys !
it doesn't have anything to do with resizing or loading the images.
i only had to make sure my image file ends with (.jpg) (the images extension were .JPG in capital) so they were not detected by my image filter.
i turned image file name to lowercase and checked the extension and that's it !
all works fine !
thank you all
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

all works fine !


good to see that and Thanks for sharing..

sometime even small things become big for us.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: loading large image file
 
Similar Threads
Combine multiple images with mosaic JAI
DISPLAY an IMAGE
problem with server relative paths for images
image compare
Creating image file after manipulation in bits of image