• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading large image file

 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seem to recall that Toolkit loads images asynchronously so you have to use MediaTracker to see if the image is fully loaded.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageIO.read is another method for loading images. since it also doesn't load asynchronously.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
all works fine !


good to see that and Thanks for sharing..

sometime even small things become big for us.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic