class

UIng::Image

Inherits UIng::BlockConstructor < Reference < Object

Constructors

from_crimage(source : CrImage::Image) : Image

Creates a native image from any CrImage image. The caller owns the result.

Source
from_file(path : String) : Image

Reads an image by content, independently of its file extension. The caller owns the returned native image.

Source
new(*args, &)
Source
new(*args, **kwargs, &)
Source
new(width : Number, height : Number)
Source

Instance methods

append(pixels : Bytes, pixel_width : Int32, pixel_height : Int32, byte_stride : Int32) : Nil
Source
append(pixels : Pointer, pixel_width : Int32, pixel_height : Int32, byte_stride : Int32) : Nil

The caller is responsible for ensuring that the pointer references at least byte_stride * pixel_height readable bytes.

Source
append(source : CrImage::Image) : Nil

Adds a CrImage representation, for example a higher resolution icon.

Source
copy

Returns an independent native image with the same pixel representations.

Source
free
Source
height
Source
size

Returns the image's logical dimensions in points.

Source
to_unsafe
Source
width
Source