From: Alex Fenton Date: 2008-04-02T17:15:16+09:00 Subject: Re: wxruby: paint monochrome bitmaps in other colors crystalbrittle@gmail.com wrote: > Is there an easy way to change the black and white pixels in a > monochrome bitmap to arbitrary color values? I just want to load in a > monochrome gif (or png) and display it in a window with, say, orange > for the black pixels, and yellow for the white Set the drawing device context's text_foreground and text_background to be the colours you want, then a mono bitmap will be drawn in those colours; http://wxruby.rubyforge.org/doc/dc.html#DC_drawbitmap bitmap.depth = 1 dc.text_foreground = Wx::Colour.new(255, 128, 0) dc.text_background = Wx::Colour.new(255, 255, 0) dc.draw_bitmap(bitmap, 0, 0, false) wxRuby specific questions are usually better posted at http://rubyforge.org/mailman/listinfo/wxruby-users alex