Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 1:52 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ]  Bookmark and Share
Author Message
 Post subject: problem with reading .bmp file
PostPosted: Tue Apr 24, 2007 10:23 am 
Offline

Joined: Tue Apr 24, 2007 10:16 am
Posts: 0
Currently I'm using imageIO.read() to read image files but it seems not to be working for bmp files.


BufferedImage strawImage = ImageIO.read(new File("strawberry.jpg"));
if(strawImage == null) System.out.println ("Image jpg read error");


BufferedImage appleImage = ImageIO.read(new File("apple.bmp"));
if(appleImage == null) System.out.println ("Image bmp read error");


it returns "Image bmp read error", which means it read the jpg, but not the bmp. I tried displaying them as Frame, and jpg shows up well, while bmp doesn't.

Does anyone know why? :( I'm stuck plz help me~


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 05, 2007 5:28 pm 
Offline

Joined: Thu Apr 26, 2007 11:18 pm
Posts: 6
Hi Raddic

I don't know exactly, how it is with new version of java.
Previous versions were supporting JPEG, GIF and PNG formats only
Maybe you will find a proper library to load BMP images here:
http://schmidt.devlib.org/java/pixel-im ... aries.html

Regards
Marecki


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley