class UIng::Image

Defined in:

uing/crimage.cr
uing/image.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_crimage(source : CrImage::Image) : Image #

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


[View source]
def self.from_file(path : String) : Image #

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


[View source]
def self.new(width : Number, height : Number) #

[View source]

Instance Method Detail

def append(pixels : Bytes, pixel_width : Int32, pixel_height : Int32, byte_stride : Int32) : Nil #

[View source]
def 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.


[View source]
def append(source : CrImage::Image) : Nil #

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


[View source]
def copy : Image #

Returns an independent native image with the same pixel representations.


[View source]
def free : Nil #

[View source]
def height : Float64 #

[View source]
def size : Tuple(Float64, Float64) #

Returns the image's logical dimensions in points.


[View source]
def to_unsafe #

[View source]
def width : Float64 #

[View source]