struct Espresso::Image


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.

Defined in:



Instance Method Summary

Constructor Detail

def, height) #

Creates an empty image of the specified size.

[View source]

Instance Method Detail

def height : Int32 #

Height, in pixels, of this image.

[View source]
def pixels : Bytes #

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.

[View source]
def to_unsafe #

Returns a GLFW image structure.

[View source]
def width : Int32 #

Width, in pixels, of this image.

[View source]