The size of raster image files is positively correlated with
the resolution and images size (number of pixels) and the color depth (bits per
pixel). Images 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 that can be expanded back to its uncompressed form with
a corresponding decompression algorithm. Images with the same number of pixels
and color depth can have very different compressed file size. 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.
Vector images, unlike raster images, can be any dimension
independent of file size. File size increases only with the addition of more
vectors.
For example, a 640 * 480 pixel image with 24-bit color would
occupy almost a megabyte of space:
640 * 480 * 24 = 7,372,800 bits = 921,600 bytes = 900
kB
No comments:
Post a Comment