The following code works when I use a bitmap from the Ruby Tk demos kit
("flagup.bmp"), but not when I use a bitmap I created with Microsoft Paint or
other packages. I get the opposite reaction from MS Paint, it will not read
the "flagup.bmp" (not a valid bitmap file).

I get the following error message:

/cygdrive/c/RUBY/lib/ruby/1.6/tk.rb:887:in '_invoke':format error in bitmap data

I get a similiar error on UNIX.

--- Code Snipet Begins Here ---

  def helpAbout

    image = TkBitmapImage.new('file'    =>[File.dirname($0), 'flagup.bmp'].join(File::Separator),\
                              'maskfile'=>[File.dirname($0), 'flagup.bmp'].join(File::Separator))

    w = TkToplevel.new
    f = TkFrame.new(w)
    b = TkCheckbutton.new(f, 'command'=>proc{w.destroy; w=nil}, 'image'=>image, 'indicatoron'=>0).pack('fill'=>'both')
    b.configure('activebackground'=>b.cget('background'))

    f.pack

  end

--- Code Snipet Ends Here ---

--- tk.rb Snipet Begins Here ---

  class TclTkIp
    # from tkencoding.rb by ttate / jaist.ac.jp
    alias __eval _eval
    alias __invoke _invoke
    private :__eval
    private :__invoke

    attr_accessor :encoding

    def _eval(cmd)
      if @encoding
  _fromUTF8(__eval(_toUTF8(cmd, @encoding)), @encoding)
      else
  __eval(cmd)
      end
    end

    def _invoke(*cmds)
      if @encoding
  cmds = cmds.collect{|cmd| _toUTF8(cmd, @encoding)}
  _fromUTF8(__invoke(*cmds), @encoding)                        # Line 887
      else
  __invoke(*cmds)
  end
    end
  end

--- tk.rb Snipet Ends Here ---