(One intermediate revision by one other user not shown)
Line 11:
== Image file sizes ==
The size of raster image files is positively correlated with the number of pixels in the image and the color depth (bits per pixel). However, imagesImages can be compressed in various ways, however. A compression [[algorithm]] stores either an exact representation or an approximation of the original image in a smaller number of bytes,whichthat can later be expanded back to its uncompressed form usingwith a corresponding decompression algorithm. Images with the same number of pixels and color depth can have very different compressed file sizes. Considering exactly the same compression, number of pixels, and color depth for two images, different graphical complexity of the original images may also result in very different file sizes after compression due to the nature of compression algorithms. With some compression formats, images that are less complex may result in smaller compressed file sizes. This characteristic sometimes results in a smaller file size for some lossless formats than lossy formats. For example, graphically simple images (i.e., images with large continuous regions like line art or animation sequences) may be losslessly compressed into a GIF or PNG format and result in a smaller file size than a lossy JPEG format.
For instanceexample, a 640 × 480640{{resx}}480 pixel image with 24-bit color would occupy almost onea megabyte of space:▼
Images with the same number of pixels and color depth can still have very different compressed file sizes. When applying the same compression method to two images with identical pixel counts and color depth, variations in the graphical complexity of the images may lead to different file sizes after compression. In some formats, less complex images result in smaller compressed file sizes. This can even cause certain lossless formats to produce smaller files than lossy formats. For example, graphically simple images (i.e., those with large continuous regions, such as line art or animation sequences) may be losslessly compressed into GIF or PNG formats, resulting in smaller file sizes than when compressed into a lossy JPEG format.
In contrast, the size of vector images increases only with the addition of more vectors.<ref>{{Cite web |last=zaryab |first=zaryab |title=How to Resize Images Easily Without Losing Quality: A Complete Guide |url=https://medium.com/@sark60362/how-to-resize-images-easily-without-losing-quality-a-complete-guide-247b2a874914 |url-status=live |archive-url=https://medium.com/@sark60362/how-to-resize-images-easily-without-losing-quality-a-complete-guide-247b2a874914 |archive-date=Aug 10, 2025 |access-date=Aug 10, 2025 |website=medium .com}}</ref>