struct

Espresso::Image

Inherits Struct / Value / Object

Describes a single 2D image.

The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. The pixels are arranged canonically as sequential rows, starting from the top-left corner.

Constructors

new(width : Int32, height : Int32)

Creates an empty image of the specified size.

Source

Instance methods

height

Height, in pixels, of this image.

Source
pixels

Raw pixel data of this image. The pixels are arranged left-to-right, top-to-bottom. Each pixel is 4 bytes, little-endian, and ordered as RGBA.

Source
to_unsafe

Returns a GLFW image structure.

Source
width

Width, in pixels, of this image.

Source