All formats

File formats

Practical information about file formats: what a format is used for, how it’s structured, where the official specification is, which programs open and edit it, and which open-source libraries read and write it in C/C++, C#, Java, Go, Python, Ruby, Rust and PHP, with code examples.

Images#

PNGPNG is a lossless raster image format with alpha transparency. File structure (signature, chunks, IHDR, IDAT), W3C specification, software, libraries. JPEGJPEG is the lossy image format for photos. File structure (SOI, APPn, DQT, SOF, DHT, SOS markers), JFIF and Exif, progressive and chroma subsampling. GIFGIF is a palette-based image format with LZW compression, best known for short looping animations. File structure, specification, software and libraries. WebPWebP is Google's lossy and lossless image format with transparency and animation. RIFF file structure (VP8, VP8L, VP8X chunks), RFC 9649, libraries. AVIFAVIF stores AV1-compressed images in a HEIF container: small lossy and lossless files, alpha, HDR and animation. File structure, spec, software and libraries. JPEG XLJPEG XL is a royalty-free image format with lossy, lossless and lossless JPEG recompression. File structure, specification, software and libraries. HEICHEIC is the HEVC-coded HEIF image format used by iPhone photos. File structure (ftyp, meta, iinf, iloc), patents, how to open HEIC on Windows, libraries. TIFFTIFF is a flexible raster image format for scans, print, archives, GIS and science. File structure (IFDs, tags, strips, tiles), BigTIFF, GeoTIFF, libraries. BMPBMP is the uncompressed Windows bitmap image format. File structure (file header, DIB header, palette, bottom-up rows), compression, software, libraries. ICOICO is the Windows icon format: one file holds the same icon in several sizes, stored as BMP or PNG. ICONDIR header, CUR cursors, favicon.ico and libraries. TGATGA (Targa) is a raster image format with alpha, used for game textures and render output. File structure (header, RLE, footer), spec, software, libraries. JPEG 2000JPEG 2000 is a wavelet-based image format for lossy and lossless compression, used in PDF, digital cinema and DICOM. File structure, software, libraries. JPEG XRJPEG XR (.jxr, .hdp, .wdp) is Microsoft's image format for lossy and lossless HDR images, used for Windows HDR screenshots. File structure, specs, software. SVGSVG is an XML-based vector image format for icons, logos, diagrams and web graphics. File structure, path syntax, SVGZ, security, W3C specifications.

Documents#

eBooks#

Comic books and archives#