-
November 9th, 2004, 07:48 PM
#1
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
-
November 10th, 2004, 07:40 AM
#2
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)
-
November 10th, 2004, 07:52 AM
#3
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.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|