abstract class CrImage::Image

Overview

Common base class for GrayscaleImage and RGBAImage. All Images are readable and saveable to the filesystem or IO stream.

Direct Known Subclasses

Defined in:

cr-image/image.cr

Instance Method Summary

Macro Summary

Instance Method Detail

abstract def [](channel_type : ChannelType) : Array(UInt8) #

Get the Array(UInt8) corresponding to channel_type)


[View source]
abstract def []=(channel_type : ChannelType, channel : Array(UInt8)) : Array(UInt8) #

Set the Array(UInt8) corresponding to channel_type) to channel


[View source]
abstract def alpha : Array(UInt8) #

Return the alpha channel


[View source]
abstract def blue : Array(UInt8) #

Return the blue channel


[View source]
abstract def each_channel(& : Array(UInt8), ChannelType -> Nil) : Nil #

Run provided block on each channel supported by this image.


[View source]
abstract def each_color_channel(& : Array(UInt8), ChannelType -> Nil) : Nil #

Run provided block on each channel supported by this image.


[View source]
abstract def green : Array(UInt8) #

Return the green channel


[View source]
abstract def height : Int32 #

Height of image


[View source]
abstract def red : Array(UInt8) #

Return the red channel


[View source]
abstract def size : Int32 #

Size (total pixels) in image (#width * #height)


[View source]
abstract def width : Int32 #

Width of image


[View source]

Macro Detail

macro subsclasses_include(mod) #

[View source]