Textures - BMP vs JPG

Blitz3D Forums/Blitz3D Programming/Textures - BMP vs JPG

As far as I know, there would be no slow-down during real-time rendering when using JPG images, because Blitz3D first decompresses the JPG image to a bitmap. The only slow-down you would get is at loading time, when the LoadTexture() command loads and decompresses the image (which may take a little longer to load than a standard bmp or png file).

If you plan on loading huge images (4096 x 4096, for example), it's probably best to use JPG images. This not only saves space, but would save the time of loading a 45MB file from the hard drive.

If the images are relatively medium sized or small (less than 512 x 512), the hard disc access time might not be a problem, and BMP or PNG files may load faster. Using a PNG or BMP file in this case would probably be best, unless you plan to distribute your app/game online as shareware/freeware, where it is essential to keep file sizes to a minimum.

It might help to do a small experiment to find which file format loads faster, using MilliSecs() to calculate loading times.