Perceptual Hashing
Perceptual hashing (pHash) generates a compact fingerprint of an image based on its visual content rather than its raw bytes. Unlike cryptographic hashes (MD5, SHA1) that change entirely with any pixel difference, perceptual hashes of visually similar images produce similar or identical values. This makes them ideal for duplicate photo detection — two versions of the same image at different sizes or quality levels will share nearly identical pHash values.
Pixel
A pixel (picture element) is the smallest addressable unit of a raster image, representing a single color value. In an RGB image, each pixel stores three channel values (0–255 for 8-bit). A 3000 x 2000 pixel image contains exactly 6 million pixels — 6 megapixels. Pixel count does not directly determine file size, which also depends on the format, compression level, and content complexity of the image.
PNG
PNG (Portable Network Graphics) is a lossless raster format introduced in 1996 as a patent-free alternative to GIF. It supports full RGB color, alpha channel transparency, and both 8-bit and 16-bit color depth. PNG is optimal for screenshots, logos, illustrations, and any image where sharpness or transparency is required. For photographs, PNG files are typically 5–10x larger than equivalent JPEGs, making WebP or AVIF a better choice.
Progressive JPEG
A progressive JPEG loads in multiple passes, showing a low-resolution version of the entire image first, then progressively refining it with each subsequent scan until full quality is reached. This contrasts with baseline JPEGs that load from top to bottom in a single pass. Progressive JPEGs are often slightly smaller than baseline equivalents and deliver a better perceived loading experience, which matters for Core Web Vitals (LCP).