What is a JPEG image?
JPEG (.jpg) is a lossy image format for photos. A file is a series of segments that start with a 0xFF marker: SOI, application segments like JFIF and EXIF, quantisation and Huffman tables, the compressed scan, and EOI at the end.
Two classic bugs: ignoring the EXIF orientation tag, so phone photos show sideways, and crashing on a file that ends early. The generator writes both cases on purpose.
Anatomy of a JPEG image
FF D8SOI, start of imageFF E0 JFIFThe JFIF headerFF E1 ExifEXIF metadata, here with the Orientation tagFF DB / FF C4Quantisation and Huffman tablesFF DAStart of scan: the compressed pixelsFF D9EOI, end of image
What you can generate
- 1×1 to 8000×8000 pixels
- Quality 1 to 100
- EXIF orientation 1, 3, 6 or 8
- Gradient, checkerboard, colour bars, noise or solid
- Truncated file with no EOI marker
How to make one
- Open the JPEG image generator, or start from a preset above.
- Set the size and switch on the edge cases you need; the preview and size estimate follow every change.
- Generate, then download. The file is made in your browser, and the same preset and seed always give you the same file.
Questions
Your browser's own JPEG encoder, through an off-screen canvas. The same settings give the same bytes in the same browser; another browser may encode slightly differently.
It tells viewers to rotate the image 90° clockwise before showing it. Software that ignores the tag shows the image sideways.