I've heard bitmap (.bmp) is an uncompressed image format to store images. Does it mean that it can store images in high quality i.e. with no loss of quality in other words, lossless format?
I'm confused between the terms 'uncompressed' and 'lossless' here. are they both same?
3 Answers
The terms "uncompressed" and "lossless" mean two different things. Compression exists in two forms, lossy (like JPG) and lossless (like ZIP).
Lossless compression is typically used for programs and text files. It removes redundant information from the file to compress it. It generally doesn't do a very good job of compressing media files.
Lossy compression achieves a high compression rate, even for data types that usually don't compress well using lossless compression. It does this be removing information that is non-critical. JPG compression, for example, removes image details that are virtually invisible to the human eye. MP3 compression removes sounds that the human ear can barely, if at all, hear.
The BMP format is both lossless and uncompressed.
Uncompressed and lossless are not the same. Some compression formats are lossy (for images, the most common one is JPEG) and others are not (the compression methods used by GIF, PNG and TIFF images, for example). You can use BMP images to prevent loss of quality, but you can also use PNGs and save your disk space.
For storing your images with no loss in quality (if this is what you wanted to do) I recommend .png. You can make the size smaller than .bmp and the image will still be 100% perfect.
A longer explanation:
Uncompressed
Not compressed. Not made smaller. If we are dealing with Images then I believe .bmp is the only (or at least the most 'common') uncompressed format available. Not recommended for nearly any use these days. To make a metaphore we could say that if we wanted to leave a blanket uncompressed, we would do nothing to the blanket and just spread it out like normal.
Compressed
File has been made smaller. Can be one of two general styles of compression: Lossless or lossy. Both make the file smaller but in different ways. Lossy generally makes the file much smaller than lossless but loses information about the original. Lossy compression is used with media files much more often than lossless.
Lossless
Does not lose any of the original information. The original uncompressed file can be reassembled from this. If we are talking about images the most common format is .png. If it's just generic files the most common is .zip. To continue the blanket metaphore: if we wanted to compress the blanket in a lossless way we would fold it a few times so it is smaller.