C ++ - Wie könnte ich eine Operation auf bmp-Datei?
-
05-10-2019 - |
Frage
Ich bin interessant, einige Transformation, wie Änderung einer Farbe zur anderen zu tun, zählen alle verwendeten Farben und Größe ändern Bild. I NICHT will jede exist Bibliothek verwenden, würde Ich mag schreiben myslelf alle Codes.
Zusammengefasst: Wie kann ich offen BMP
Datei und ändere
Lösung
Ich würde beginnen mit eine Dokumentation lesen. Gehe zu Wikipedia Vielleicht ein für Überblick .
Andere Tipps
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.
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.