-3

Well I have a problem . I need to change a bitmap.bmp color into black and white using c++ , but the problem is I don't know how to read and change pixels . I don't know a bit about how to read a bitmap file . what library should I include? how should I work with pixels after scanning them ? I tried searching the web but I didn't find what I was seeking. any help would be appreciated ... I really need this information ...

Jørgen R
  • 9,179
  • 7
  • 36
  • 56
ADAN
  • 13
  • 1
  • http://stackoverflow.com/questions/5751749/how-can-i-read-bmp-pixel-values-into-an-array may help you. The [bmp file format](http://en.wikipedia.org/wiki/BMP_file_format) is pretty simple to work with. – Retired Ninja Feb 13 '15 at 09:45
  • This question is [too broad](http://stackoverflow.com/help/on-topic). There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. – Jørgen R Feb 13 '15 at 11:05

1 Answers1

-2

in order to read bitmap u can use this and save .bmp bits as char to a vector(for example)...

#include<vector>
using namespace std;

int main()
{
   char bit;
   vector<char> name;

   while(cin.get(bit))
   {
       name.push_back(bit);
   }

return 0;
}
patriot43
  • 14
  • 1