image formats intro: jpeg png gif webp
most important things to know about image formats
lossy vs lossless
| format | lossy? |
|---|---|
| PNG | lossless |
| JPEG | lossy |
| WebP | lossy or lossless |
| GIF | lossless |
Lossy means each time you save the image, the quality degrades. Including, rotate, crop, resave, or any edit, or converting from another image.
lossy image compression was created because it can make file size by 10 times smaller yet with littel perceived visual quality loss, by exploiting human perception.
number colors
| format | number colors |
|---|---|
| PNG | 8 bits per channel |
| JPEG | 8 bits per channel |
| WebP | 8 bits per channel |
| GIF | 256 total |
If the destination format do not support some features, such as colors, it'll be lost. E.g. Converting from png to gif.
new image formats, such as HEIC, AVIF, JPEG XL, supports more than 8 bits per color channel, for wide color gamut.
animation
| format | animation |
|---|---|
| PNG | no |
| JPEG | no |
| WebP | yes |
| GIF | yes |
image processing
- Image / Video Processing. Index
- image formats intro: jpeg png gif webp
- sRGB, Wide Gamut Colors, Display P3
- new image formats. HEIC, AVIF, JPEG XL (2026)
- convert image webp
- ImageMagick Tutorial
- Optimize png, oxipng
- Convert png jpg heic on MacOS, using sips
- Delete EXIF metadata in image file (exiftool)
- Optimize SVG File