JPG to BMP enlarges file size?

retexan599

TPF Noob!
Joined
Jun 14, 2009
Messages
4
Reaction score
0
Location
Houston, TX
Can others edit my Photos
Photos NOT OK to edit
I have encountered something puzzling to me. I take a normal .jpg file with a file size of, say 55kb. I open it in MS Paint, then save it, without editing, as a .bmp file. The file size now shows as 567kb. I had understood that a .jpg file underwent compression from its original state, and the loss could not be recovered. So, what has Paint done with the file to create a 10x file size increase when saving as a .bmp? The same thing happens if I open the .jpg in IrfanView and then save it as .bmp. How does the file size get enlarged; I don't imagine the .jpg has acquired better quality by saving as .bmp, but why did the file size get so big? Thanks, I am still learning.
 
Yes, this is to be expected. A bmp is a very simple uncompressed file. Each pixel is represented by a digit directly relative to it's value, one by one out over a "space" - hence, a "bitmap", bits of informations mapped over a two (well, three counting color) dimensional space. There is typically no compression at all with BMP.

JPEG files must be uncompressed before they can be viewed or worked on and turned into the native format the software expects to work with. This is why a jpeg file will be smaller than a bitmap. It's compressed when saved and uncompressed when viewed.

When you take a jpeg and resave it as a bmp, new data is not created (i.e. the quality does not improve) but rather how the data that previously existed in the jpeg is stored differently. Likewise, any jpeg artifacts, both visible and hidden, will be saved into the bitmap file. Now, if you resave the bitmap over and over no new compression artifacts will emerge but the original artifacts present when it was converted from the lossy format (jpeg) to the lossless (bmp) will and will be there unchanged unless somehow altered (i.e. noise removal).
 
JPEG files are compressed, BMP files are not. BMP files are, as the name implies, bitmaps. Every pixel = 1, 2, 3, or 4 bytes of disk space depending on color depth.
 

Most reactions

New Topics

Back
Top