Solution form Displaying .BMP file in a Java Applet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Solution form Displaying .BMP file in a Java Applet

  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Question Solution form Displaying .BMP file in a Java Applet

    Hi Friends, I have been trying to display .bmp file in applet. But i did't completed. I want to know is there any .java/.class file, which converts .bmp file into .gif/.jpg.. or any other solution to slove this proble.

  2. #2
    Join Date
    Mar 2005
    Posts
    2
    reply soon

  3. #3
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    You should not use bmp files on the web, they are too big. Convert to jpg or gif using
    some image processing program.
    If you haven't got any such program there are myriads of them free and available out there.
    I don't know of any ready made converters in java, but you can 'roll your own' using pixel
    manipulation, but I think that is reserved for people who enjoy pain...

    If it a converter exists, then you still have to pay the price for time consuming bmp upload.
    eschew obfuscation

  4. #4
    Join Date
    Mar 2005
    Location
    Sendling, MUC, .de
    Posts
    100
    Although I agree with sjalle wrt. bmp vs gif/jpg, you might want to have a look at
    Code:
    javax.imageio.ImageIO.read(File)
    a static method that returns a java.awt.image.BufferedImage (if you're lucky ). I cannot explain all that stuff, please refer to the API documentation for details.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center