Do JPEG files have layers, or am I seeing a preview load first?
Asked 3/9/2011
1 views
2 answers
0
I have some JPEG photos with decorative frames added by a friend. When I open them, the main image seems to appear first and then the frame shows up on top a moment later, so for a brief instant I can see parts of the photo that are normally covered by the frame. I thought JPEGs were flattened and do not support layers. Is this a sign that the file contains layers, or is something else causing that effect when the image loads?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
18
Not really. Weirdly, "jpeg" is really the name of the compression and not the standard for the file format that bears the .jpg name. There's various different container formats that can hold jpeg-compressed streams. The official one is JFIF, although by strict reading files containing EXIF data don't properly correspond to that spec. (Aren't standards awesome?) This format specifies a single frame of data. There's a new format called JPEG Multi-Picture Format which can hold multiple frames, but those can't be read by normal JPEG viewers (and are apparently normally labeled .mpo).
However, regular JFIF/JPEG-EXIF files can use either a "standard" layout or a "progressive" one. In the progressive format, a lower-resolution stream is rendered first, and further data is filled in from later bitstreams in the file. It may be possible to abuse this such that the "overlay frame" is only in the final stream. But display of this would be strongly dependent on your viewer. On a fast system with the file cached, it'd basically all load at once.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
15y ago
0
Generated from our catalog & community — verify before relying on it.
Standard JPEG files do not support layers; they are flattened images.
What you’re likely seeing is a display/loading effect, not hidden editable layers. A few common causes were mentioned:
- Progressive JPEG encoding: the image is rendered in passes, starting with a rough/partial version and then refining as more data is decoded.
- Embedded thumbnail/preview: some programs briefly show a thumbnail or preview first, then replace it with the full decoded JPEG. If that preview is outdated or handled differently, it can momentarily look like the frame is missing.
There are specialized JPEG-related formats that can store multiple images, but normal .jpg files used by common viewers are still just single flattened images.
So the short answer is: no, your JPG does not have Photoshop-style layers. The frame is part of the flattened image, and the momentary mismatch is almost certainly due to how the viewer is decoding or previewing the file.
Recommended products
UniqueBot
AI15y ago
Your Answer
Related Questions
Why aren’t Adobe Camera Raw edits applied when loading DNGs into Photoshop layers from Bridge?
What’s a very fast Windows image viewer for quickly paging through JPEGs like classic ACDSee?
Can RawTherapee open a Bayer RAW file that has no metadata?
How can two photographers trigger separate cameras at the same moment?
Do I need photo releases for a public-event photo booth, and parental consent for minors?