thanks alot i see what i can do with your information this weekend and once again thanks alot i got another question what do you mean by parse the BMP format??? i believe we using pure Dev_C++ ( As you can see i'm not a good programer). we open the image using Irfanview but we call Irfanview using Dev_C++
--- In [email protected], "Milan Babuskov" <[EMAIL PROTECTED]> wrote: > > --- krome152001 wrote: > > it a BMP format it is in the same folder as our program which is > > Dev-C++, we got irfanview to display the image now we need to write > > a code to detect a color ( red)? any ideas?????? > > One way is to open the file and parse the BMP format to find the > color. You don't need anything else but Dev-C++ for that. There are > various websites that give explanation of format, this might be a good > starting point: > > http://en.wikipedia.org/wiki/Bitmap > > > I don't know if you're using pure Dev-C++? For example if you use it > with wxWidgets plugin (wxDev-C++) you can use wxImage class to load > image from file into memory and then inspect it. > > Other than that, perhaps SDL_image library is also a good candidate. > > As for IrfanView, maybe you should check it's documentation, maybe it > has some ways to run it from command line and it would output some > info about images. But that still sounds like a weird idea. > > -- > > Milan Babuskov > http://www.guacosoft.com >
