K. Tsang wrote:use bmp for images will definitely make your jar smaller. if you don't believe try it. but then you will need to replace your html img tags.
This is not an absolute - it depends on your original bitmap file, and on what you use to create the GIF.
For example, starting with the ArchProject.bmp file from
this post
As expected, the resultant file sizes are smaller than the original bmp. Now lets add them to a jar file and see how it looks. For the BMP the jar file will try to compress it as well as it can. For the GIF and JPG formats, it will be trying to compress a compressed image (which is not necessarily a good thing):
Column 4 shows the uncompressed size, and column 6 shows the compressed size.
As expected, the BMP file compressed nicely - it started at 983094 bytes as a file on my hard drive, and became 3734 bytes when stored within the jar file.
The GIF file however could not be compressed further, and in trying to compress it, the size of the file within the jar actually became larger than the original file. That is, the GIF file was 2603 bytes as a file on the hard drive, and 2608 bytes as a file within the jar file.
However the resultant compressed GIF was still smaller than the final compressed BMP file.
Even using zip with maximum compression only reduced the bmp to 2863 bytes while leaving the gif at 2603 bytes.
All of which is rather academic - unless there are a
lot of image files (and there really shouldn't be for this project) you are unlikely to make that much of a difference to the overall jar file size.