class
UIng::Image
- UIng::Image
- Reference
- Object
Defined in:
uing/crimage.cruing/image.cr
Constructors
-
.from_crimage(source : CrImage::Image) : Image
Creates a native image from any CrImage image.
-
.from_file(path : String) : Image
Reads an image by content, independently of its file extension.
- .new(width : Number, height : Number)
Instance Method Summary
- #append(pixels : Bytes, pixel_width : Int32, pixel_height : Int32, byte_stride : Int32) : Nil
-
#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_heightreadable bytes. -
#append(source : CrImage::Image) : Nil
Adds a CrImage representation, for example a higher resolution icon.
-
#copy : Image
Returns an independent native image with the same pixel representations.
- #free : Nil
- #height : Float64
-
#size : Tuple(Float64, Float64)
Returns the image's logical dimensions in points.
- #to_unsafe
- #width : Float64
Constructor Detail
Creates a native image from any CrImage image. The caller owns the result.
Reads an image by content, independently of its file extension. The caller owns the returned native image.
Instance Method Detail
The caller is responsible for ensuring that the pointer references at least
byte_stride * pixel_height readable bytes.
Adds a CrImage representation, for example a higher resolution icon.
Returns an independent native image with the same pixel representations.