Reputation: 11
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?
Upvotes: 0
Views: 956
Reputation: 347576
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.
Upvotes: 2
Reputation: 126536
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.
Upvotes: 1
Reputation: 52166
I would start with reading some documentation. Maybe go to Wikipedia for an overview.
Upvotes: 1