Thread: Bitmat manipulation

  1. #1
    Gr3g
    Guest

    Question Bitmat manipulation

    hey,
    Im looing for a lib that i can use to open a bitmap, read the contents (pixel by pixel preferably the color in RGB), then write to the file that some pixel is red, blue, or whatever color.

    Thanks,

    Gr3g

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    You can use SDL for this, although it's a much more general API than just modifying BMPs.

    Here are two examples of my code reading a BMP from a file, making pixel level changes, and then saving the BMP for my up and coming bomberman game. The code in these are not really pretty.. they were made to programatically manipulate BMPs into how I wanted them to look.

    http://cvs.sourceforge.net/cgi-bin/v...viewcvs-markup

    http://cvs.sourceforge.net/cgi-bin/v...viewcvs-markup

    You can get SDL from http://www.libsdl.org if you so choose.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Library functions eg. String manipulation function
    By bhupesh.kec in forum C Programming
    Replies: 6
    Last Post: 07-08-2008, 07:32 AM
  2. Replies: 4
    Last Post: 10-21-2003, 04:28 PM
  3. Bit Manipulation Questions
    By CPPNewbie in forum C++ Programming
    Replies: 7
    Last Post: 08-12-2003, 02:17 PM
  4. string manipulation
    By ubershatten in forum C++ Programming
    Replies: 1
    Last Post: 07-25-2002, 10:37 PM
  5. File manipulation
    By Shadow in forum C Programming
    Replies: 1
    Last Post: 04-23-2002, 08:07 AM