Raster Image
A digital image composed of a rectangular grid of pixels, where each pixel stores individual color data. Ideal for photographs and complex color gradients.
A raster image (also called a bitmap image) represents visual information as a two-dimensional grid of pixels arranged in rows and columns. Each pixel holds discrete color data, and the aggregate of millions of these tiny color points produces photographs, illustrations, and other complex imagery. Common raster formats include JPEG, PNG, GIF, WebP, and AVIF.
- Resolution dependency: Raster images have a fixed pixel count, so enlarging them beyond their native resolution causes visible pixelation and jagged edges (aliasing). Print workflows typically require 300 DPI or higher, while web images use 72-96 DPI as a baseline
- Color depth and file size: More bits per pixel means a wider color gamut but larger files. An uncompressed image's data size can be estimated with
width x height x bitsPerPixel / 8 - Compression strategies: Lossy compression (JPEG) excels at photographs with smooth gradients, while lossless compression (PNG) preserves exact pixel data for graphics containing text or sharp edges
Digital cameras and scanners inherently produce raster data. Image editors like Photoshop and GIMP operate primarily on raster images, offering pixel-level manipulation. In modern web development, the srcset attribute and responsive image techniques deliver appropriately sized raster assets to different devices, balancing visual quality against bandwidth consumption.