darpangoel
asked on
bmps and jpegs
could any one kindly explain how bmp's and jpegs are stored or more imprtantly how can they be decoded. how does the software know about the size of the image (a x b) pixels.
and what is the colour combination. kindly give me details because i am a novice in this area.
thank you.
and what is the colour combination. kindly give me details because i am a novice in this area.
thank you.
although it's more about gifs & jpgs, http://www.askscott.com/scott/scholastic/GIFJPG.htm may have the info you need.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well i want to actually write a code in c++ to display a .bmp and a .jpeg file. so for that i wanted to know how the files headers are written and how these files are encoded.
BITMAPS GERENALLY, AS THE NAME ITSELF SIGNIFIES ARE CONSTRUCTED ON BASIS OF BITS..
EACH DOTS YOU SEE ON YOUR SCREEN ARE CALLED BITS... (GENERALLY CALLED PIXELS)
SO, EACH BITMAP WILL HAVE CERTAIN PIXELS ON THE IMAGE OF DIFFERENT COLOR EACH.
PIXELS ARE TAKEN INTO CONSIDERATION BY DEFINING THE DIMENSION OF THE IMAGE.
E.G., 100 Px X 200 Px
THIS DENOTES THAT THERE ARE 100 PIXELS HORIZONTALLY ON 1 X AXIS AND 200 PIXELS VERTICALLY ON Y AXIS.
SIMILARLY, JPEGS ARE COMPRESSED BITMAPS BUT NOT AS CLEAR AS BMPS...
THERE ARE ONLY SOME COLORS DEFINED IN JPEGS INSTEAD OF SUPPORTING ALL POSSIBLE COLORS TO AVOID THE INCREASE IN FILE SIZE.
JPEG file is always compressed and so the file sizes of all jpegs are less.. this affects colors.. try converting a big bmp file to a low quality jpg, you will see unwanted and un expected color pixels......
THE COLORS IN JPEG MAY BE NEARER TO THE COLORS IN BMP FILE. BUT NOT THE EXACT ONES...
EACH DOTS YOU SEE ON YOUR SCREEN ARE CALLED BITS... (GENERALLY CALLED PIXELS)
SO, EACH BITMAP WILL HAVE CERTAIN PIXELS ON THE IMAGE OF DIFFERENT COLOR EACH.
PIXELS ARE TAKEN INTO CONSIDERATION BY DEFINING THE DIMENSION OF THE IMAGE.
E.G., 100 Px X 200 Px
THIS DENOTES THAT THERE ARE 100 PIXELS HORIZONTALLY ON 1 X AXIS AND 200 PIXELS VERTICALLY ON Y AXIS.
SIMILARLY, JPEGS ARE COMPRESSED BITMAPS BUT NOT AS CLEAR AS BMPS...
THERE ARE ONLY SOME COLORS DEFINED IN JPEGS INSTEAD OF SUPPORTING ALL POSSIBLE COLORS TO AVOID THE INCREASE IN FILE SIZE.
JPEG file is always compressed and so the file sizes of all jpegs are less.. this affects colors.. try converting a big bmp file to a low quality jpg, you will see unwanted and un expected color pixels......
THE COLORS IN JPEG MAY BE NEARER TO THE COLORS IN BMP FILE. BUT NOT THE EXACT ONES...