Class: Emfsvg::DibDecoder::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/emfsvg/dib_decoder.rb

Overview

Decoded DIB bytes. The caller typically passes the concatenation of BMI + bitmap bits (matching how libemf2svg reads the record). We honour both layouts:

* "compact" form: bmi contains exactly header + palette, with no
trailing padding. Pixel data starts at header_size + palette*4.
* "padded" form (CB_BMI > minimum): bmi has unused bytes between
the palette and the bits. Use the optional bits_offset: parameter
(== cb_bmi in libemf2svg terms) to start reading pixels at the
correct byte.

Instance Attribute Summary collapse

Instance Attribute Details

#color_typeObject

Returns the value of attribute color_type

Returns:

  • (Object)

    the current value of color_type



33
34
35
# File 'lib/emfsvg/dib_decoder.rb', line 33

def color_type
  @color_type
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



33
34
35
# File 'lib/emfsvg/dib_decoder.rb', line 33

def height
  @height
end

#pixelsObject

Returns the value of attribute pixels

Returns:

  • (Object)

    the current value of pixels



33
34
35
# File 'lib/emfsvg/dib_decoder.rb', line 33

def pixels
  @pixels
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



33
34
35
# File 'lib/emfsvg/dib_decoder.rb', line 33

def width
  @width
end