-
reading a bmp file
pset and point(x,y) in olden day basic used to put a pixel and read the color of a pixel ...
I m trying to do this in VB cos i believe its easier and there must eb an easier way to do it rather than MFC.
how do you read a BMP file
or rather
display it at top left hand corner or (0,0) and read its pixels
Cheers
-
Re: reading a bmp file
That depends on the type of bmp file you are reading.... firstly, you need to retrieve the header info;
In the header info, you have things like the height and width of the image, the bit depth (eg 8, 16, 24 bit).
These links may help:
http://www.fortunecity.com/skyscrape.../bmpffrmt.html
http://astronomy.swin.edu.au/~pbourke/dataformats/bmp/
http://www.cs.uvm.edu/~erickson/educ...b_bmp/BMP.html <-- Create an image in vb)
:wave:
-
Re: reading a bmp file
If the image is to be displayed before reading the pixel values, then you don't need to get the file header. This will also work for gif, jpeg, etc. The fastest way to do this is to use the GetPixel API call. A simple loop can iterate through the image.