views:

57

answers:

3

I am interesting to do some transformation, like change one color to another, count all used colors, and resize image. I DO NOT want to use any exist library, I would like write myslelf all code.
Summing up: How could I open BMP file and change it?

+1  A: 

I would start with reading some documentation. Maybe go to Wikipedia for an overview.

genpfault
+1  A: 

You need to read in the binary file, figure out what all the bits mean, do your transformation, and write out a new binary file. For figuring out the format of various binary files, wotsit is the best resource I've found. They have links to 5 specs for BMP format files.

Chris Dodd
+2  A: 

Start by learning the bitmap file format. It is very easy to understand and implement.

You can get any file format by going to www.wotsit.org and searching for the file type you want. In your case BMP. There are different types of bitmaps so you can figure out which ones you want to implement.

Brian R. Bondy