def info_text(fg, bg)
      klass = class_type == DirectClass ? 'DirectClass' : 'PsuedoClass'

      text = <<-END_TEXT
Format: #{format}
Geometry: #{columns}x#{rows}
Class: #{klass}
Depth: #{depth} bits-per-pixel component
Colors: #{number_colors}
      END_TEXT

      info = Image.new(HISTOGRAM_COLS, HISTOGRAM_ROWS) do
        self.background_color = bg
        self.border_color = fg
      end

      gc = Draw.new

      gc.annotate(info, 0, 0, 0, 0, text) do
        self.stroke = 'transparent'
        self.fill = fg
        self.gravity = CenterGravity
      end
      info['Label'] = 'Info'

      info
    end
def info_text(fg, bg)
      klass = class_type == DirectClass ? 'DirectClass' : 'PsuedoClass'

      text = <<-END_TEXT
Format: #{format}
Geometry: #{columns}x#{rows}
Class: #{klass}
Depth: #{depth} bits-per-pixel component
Colors: #{number_colors}
      END_TEXT

      info = Image.new(HISTOGRAM_COLS, HISTOGRAM_ROWS) do
        self.background_color = bg
        self.border_color = fg
      end

      gc = Draw.new

      gc.annotate(info, 0, 0, 0, 0, text) do
        self.stroke = 'transparent'
        self.fill = fg
        self.gravity = CenterGravity
      end
      info['Label'] = 'Info'

      info
    end
Use AnnotateImage to write the stats.