• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.bmp file

 
Soumik Basu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I have written a JSP/Servlet application in windows environment. This application has to show .bmp images.
I wanted to know -is it possible for me to run this application on Linux platform and will .bmp image open properly in JSP/Servlet application running on Linux platform.
I am new to LInux,So please be generous to help me .
Thanks in advance.

regards
Soumik
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BMP is not one of the image formats supported by all browsers; use PNG instead. If you can't (or don't want to) convert the images outside of the web app, or make copies of them in PNG, have a look at the javax.imageio.ImageIO class. Its read and write methods make reading an image file into memory, and then saving it to a stream (e.g. a servlet's OutputStream), very easy.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15459
42
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, .BMP is a Microsoft format, but it is well-documented so opening a .BMP file on Linux is no problem.

The major webbrowsers including Firefox will have no problem displaying a .BMP file.

Note that, as far as I know, Microsoft's Internet Explorer unfortunately still does not fully support PNG.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right - I just verified that both Firefox and Safari support BMP. Not sure about Opera, though.

I think IE's problems with PNGs are in the area of transparency and alpha channels, which are features not supported by BMP anyway.
[ November 29, 2007: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic