I would like to read a bitmap file into a struct and manipulate it like eg. making a mirror effect, but I cannot understand which kind of struct should I be creating in order to read into it.
Thank you for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
»This is how you manually load a .BMP file
The bitmap file format:
So on with the code part. This is our struct we need to create to hold the bitmap file header.
The bftype field checks to see if you are in fact loading a .BMP file, and if you are, the field should be 0x4D42.
Now we need to create our bitmapinfoheader struct. This holds info about our bitmap.
Now on to loading our bitmap.
Now to make use of all of this:
Later on I’ll put up Writing to a .BMP, and how to load a targa file, and how to display them.«
Quoted from: http://www.vbforums.com/showthread.php?261522-C-C-Loading-Bitmap-Files-%28Manually%29 (User: BeholderOf). (Some minor corrections done)