No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
Hi! I am writing programm that will determine what number is drawn in bmp image (there is only one digit number in image). So, I am trying realize it the following way: 1. read image pixel by pixel 2. create a two dimentional array of pixel values 3. if color …
Magic++ is also good, but I prefer windows.h there are basic structures, wich will not confuse you))
The easiest way to read image pixel by pixel is: ifstream im("image.bmp",ios::in|ios::binary);//just to open some image as binary file BITMAPFILEHEADER bfh; BITMAPINFOHEADER bih;//this two components are in a lib <windows.h> im.read((char*)(&bfh),sizeof(bfh)); im.read((char*)(&bih),sizoef(bih)); RGBQUAD map[bih.biHeight][bih.biWidth];//just create some map wich will store pixels for(int i = 0;i<bih.biHeight;i++){ for(int j = 0;j<bih.biWidth;j++){ im.read((char*)(&map[i][j]),sizeof(RGBQUAD)); …
The End.
Zhassan