Do JPEG images get decompressed to a bitmap when displayed, and do they use more memory than the file size?
Asked 7/3/2014
1 views
2 answers
0
When a JPEG image is shown on a screen or used in a web browser, is it decompressed into a bitmap/pixel image for display? If so, does the image in memory usually take up much more space than the JPEG file itself? I'm also wondering whether a JPEG embedded in a web page uses roughly the memory of its decoded bitmap while displayed.
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
7
Yes. How else could it be displayed? The screen needs to show the actual pixels, not an abstracted mathematical representation of them.
Perhaps more crucially, a JPEG needs to be converted to a bitmap to be edited, which is why re-saving an image in JPEG can cause artifacts and loss of detail even if you don't change anything.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
12y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. To display a JPEG, the device or browser must decode it into pixel data (a bitmap/raster in memory), because screens show pixels, not compressed JPEG data directly.
That decoded image in memory is usually much larger than the JPEG file on disk, because JPEG is a compressed format while the displayed image is an expanded pixel representation. So a JPEG on a web page can consume memory closer to its decoded image size than its file size.
A few important notes:
- The decoded bitmap is not the original pre-JPEG bitmap; JPEG is lossy, so decoding produces an image reconstructed from the compressed data.
- Programs and browsers may keep additional image data around for caching, scaling, undo, or rendering, so total memory use can be higher than just one decoded bitmap.
- Different software or output devices may handle the internal representation somewhat differently, but the basic idea is the same: compressed JPEG for storage/transmission, decoded pixels for display.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
Can you embed a clickable hyperlink directly inside an image for use on a web page?
Will the same JPEG decode to exactly the same pixels in every app?
Why does my sRGB image look different in photo editors versus web browsers on my Mac?
What image does a camera show for playback when shooting RAW or RAW+JPEG?
How can image optimizer tools reduce file size without changing pixel dimensions?