Solved

bmps and jpegs

Posted on 2003-11-18
5
505 Views
Last Modified: 2013-11-19
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.
 
0
Comment
Question by:darpangoel
5 Comments
 
LVL 10

Expert Comment

by:KenAdney
ID: 9773155
although it's more about gifs & jpgs, http://www.askscott.com/scott/scholastic/GIFJPG.htm may have the info you need.
0
 
LVL 1

Expert Comment

by:thundercage
ID: 9775395
Try this site for more information

http://www.dcs.ed.ac.uk/home/mxr/gfx/
0
 

Accepted Solution

by:
Lightning974 earned 100 total points
ID: 9804272
Although your question doesn't lend any exact answers, maybe the following will help you.

A .bmp (Bitmap) is an exact replica of what you see, pixel by pixel, color stays intact. Making the file size much larger than that of a .jpg.

A .jpg is a compressed version of the an original image. Varying in most cases from 0 (complete loss) to 100 (least compressed and closest to exact).

To describe how a .jpg compresses the colors (depending on how much compession you select (0-100) is hard to do but here goes: Each pixel looks at its neighboring pixels and says "how closely do you resemble me, and depending on the compression, it may change both colors a bit closer in color range. It does this at every pixel, that is why when you save a jpg with higher compression it starts to blur, because each pixel is adjusting it's color a bit.

Think of it as every pixel anti-aliasing to every other neighboring pixel.

That is the basic differences, the size info along with bit depth etc. is all stored in the header of the file.

Hope this helps.
0
 
LVL 1

Author Comment

by:darpangoel
ID: 9805546
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.
0
 
LVL 1

Expert Comment

by:hemanthsharma
ID: 9816978
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...
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this Micro Tutorial viewers will learn the basic shortcuts and functions of Illustrator. The viewer will learn about the paintbrush tool, anchor points, font sizing, and more.
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now