struct Espresso::Image
- Espresso::Image
- Struct
- Value
- Object
Overview
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:
espresso/image.crConstructors
-
.new(width : Int32, height : Int32)
Creates an empty image of the specified size.
Instance Method Summary
-
#height : Int32
Height, in pixels, of this image.
-
#pixels : Bytes
Raw pixel data of this image.
-
#to_unsafe
Returns a GLFW image structure.
-
#width : Int32
Width, in pixels, of this image.
Constructor Detail
Instance Method Detail
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.