I want to know that how the storage of an image is determined (the size of an image is determined). i have read some articles but some say that 1 pixel = 1 byte (which according to me should be wrong) and some says it takes 32 bits for high depth image colors. Can somebody explain me how the storage of an image on a machine works?
Asked
Active
Viewed 33 times
0
-
1It's just like anything else. Instead of storing it is as a matrix, it is stored as a vector. The header of the image contains information like type of image (color, grayscale), dimensions, rows, coloumns, etc. 1 pixel = 1byte for grayscale images, 1 pixel = 32 bit for colored images (r,g,b,alpha). The alignment of bits may differ in little endian and big endian machines (just like any other storage). – Vihari Piratla Dec 25 '14 at 11:22
-
thanks for your reply but i want to ask that i know vector is way better than raster graphics but does vector take more memory on disk or not? and how does the header contains dimensions? – newbee Dec 25 '14 at 11:27
-
Yes, raster graphic image files are larger than vector graphics image files. See this: http://whatis.techtarget.com/definition/raster-graphics. How the dimensions are stored in header depends on the image format, now there are many of those, I cannot comment (don't know) about the specifics. – Vihari Piratla Dec 25 '14 at 13:23