how can I put the file.bmp to array using standard lib c++ or c whithout windows.h ect
edit
I want to get bmp colors to array change the array and put to bmp using standard lib
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.
Use a binary stream:
However, parsing it will be a bit trickier if you insist on doing it that way. I suggest you look into a generic C++ image library, such as the boost GIL (doesn’t support bmp) or this open source bmp library.
If you are unable to use any third party or OS-specific libraries, you will have to parse the data yourself. The C++ standard libraries don’t include anything to do that for you. You’ll have to start by familiarising yourself with the BMP structure. Wikipedia’s article has a good description of it.