bitmap
An image stored as a grid of coloured pixels, such as a screenshot.
In more detail
Visual regression tools compare two bitmaps pixel by pixel. Unlike SVG, a bitmap has a fixed resolution, so screenshots taken at different device pixel ratios cannot be compared directly.
Example
In the browser: Rasterization produces bitmaps for each layer, and the GPU combines them. ImageBitmap is the web object for a decoded bitmap that can be moved to a Web Worker without copying.Related terms
- pixel — The CSS absolute length unit px, defined as 1/96 of an inch and roughly one dot on a standard-density screen.
- baseline snapshot — The approved reference image a visual test compares new screenshots against.
- SVG — Scalable Vector Graphics, an XML-based image format that describes shapes with coordinates so it stays sharp at any size.
- rasterization — Turning drawing instructions, such as draw this text in this font, into an actual grid of coloured pixels.
- ImageBitmap — A decoded image ready to draw on a canvas, which can be transferred to a worker without copying.
Taught in
- Visual Regression Testing: Playwright & Snapshot Differencing — Design Systems & Component Engineering
- Layout, Reflow, Paint And GPU Compositing Layers — Frontend Architecture & Web Platform
- Web Workers: Off-Thread Computation And Structured Clone — Frontend Architecture & Web Platform