class Pluto::ImageRGBA

Included Modules

Defined in:

pluto/format/jpeg.cr
pluto/format/png.cr
pluto/format/webp.cr
pluto/image_rgba.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Pluto::Format::WebP

to_lossless_webp(io : IO) : Nil to_lossless_webp, to_lossy_webp(io : IO, quality : Int32 = 100) : Nil to_lossy_webp

Instance methods inherited from module Pluto::Format::PNG

to_png(io : IO) : Nil to_png

Instance methods inherited from module Pluto::Format::JPEG

to_jpeg(io : IO, quality : Int32 = 100) : Nil to_jpeg

Instance methods inherited from module Pluto::Operation::VerticalBlur

vertical_blur(radius : Int32) : self vertical_blur, vertical_blur!(radius : Int32) : self vertical_blur!

Instance methods inherited from module Pluto::Operation::Rotation

rotation(degrees : Float64, *, center_x : Int32 = width // 2, center_y : Int32 = height // 2, radius : Int32 = -1, padding : Bool = false, padding_type : PaddingType = PaddingType::Black) : self rotation, rotation!(degrees : Float64, *, center_x : Int32 = width // 2, center_y : Int32 = height // 2, radius : Int32 = -1, padding : Bool = false, padding_type : PaddingType = PaddingType::Black) : self rotation!

Instance methods inherited from module Pluto::Operation::Padding

padding(all : Int32 = 0, *, left : Int32 = 0, right : Int32 = 0, top : Int32 = 0, bottom : Int32 = 0, padding_type : PaddingType = PaddingType::Black) : self padding, padding!(all : Int32 = 0, *, left : Int32 = 0, right : Int32 = 0, top : Int32 = 0, bottom : Int32 = 0, padding_type : PaddingType = PaddingType::Black) : self padding!

Instance methods inherited from module Pluto::Operation::HorizontalBlur

horizontal_blur(radius : Int32) : self horizontal_blur, horizontal_blur!(radius : Int32) : self horizontal_blur!

Instance methods inherited from module Pluto::Operation::GaussianBlur

gaussian_blur(value : Int32) : self gaussian_blur, gaussian_blur!(value : Int32) : self gaussian_blur!

Instance methods inherited from module Pluto::Operation::Crop

crop(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self crop, crop!(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self crop!

Instance methods inherited from module Pluto::Operation::Contrast

contrast(value : Float64) : self contrast, contrast!(value : Float64) : self contrast!

Instance methods inherited from module Pluto::Operation::ChannelSwap

channel_swap(a : ChannelType, b : ChannelType) : self channel_swap, channel_swap!(a : ChannelType, b : ChannelType) : self channel_swap!

Instance methods inherited from module Pluto::Operation::Brightness

brightness(value : Float64) : self brightness, brightness!(value : Float64) : self brightness!

Instance methods inherited from module Pluto::Operation::BoxBlur

box_blur(value : Int32) : self box_blur, box_blur!(value : Int32) : self box_blur!

Instance methods inherited from module Pluto::Operation::BilinearResize

bilinear_resize(width : Int32, height : Int32) : self bilinear_resize, bilinear_resize!(width : Int32, height : Int32) : self bilinear_resize!

Instance methods inherited from module Pluto::Format::Stumpy

to_stumpy : StumpyCore::Canvas to_stumpy

Instance methods inherited from module Pluto::Format::PPM

to_ppm(io : IO) : Nil to_ppm

Instance methods inherited from class Pluto::Image

[](channel_type : ChannelType) : Array(UInt8) [], []=(channel_type : ChannelType, channel : Array(UInt8)) : Array(UInt8) []=, alpha : Array(UInt8) alpha, blue : Array(UInt8) blue, each_channel(& : Array(UInt8), ChannelType -> Nil) : Nil each_channel, green : Array(UInt8) green, height : Int32 height, red : Array(UInt8) red, size : Int32 size, width : Int32 width

Constructor Detail

def self.from_jpeg(image_data : Bytes) : self #

def self.from_jpeg(io : IO) : self #

def self.from_png(image_data : Bytes) : self #

def self.from_png(io : IO) : self #

def self.from_ppm(image_data : Bytes) : self #

def self.from_ppm(io : IO) : self #

def self.from_webp(image_data : Bytes) : self #

def self.from_webp(io : IO) : self #

def self.new(red : Array(UInt8), green : Array(UInt8), blue : Array(UInt8), alpha : Array(UInt8), width : Int32, height : Int32) #

[View source]

Class Method Detail

def self.from_stumpy(canvas : StumpyCore::Canvas) #

Instance Method Detail

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

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

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

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

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

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

[View source]
def clone : ImageRGBA #

[View source]
def each_channel(&) : Nil #

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

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

[View source]
def height : Int32 #

[View source]
def height=(height : Int32) #

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

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

[View source]
def to_ga(red_multiplier : Float = 0.299, green_multiplier : Float = 0.587, blue_multiplier : Float = 0.114) : ImageGA #

Converts the image to a grayscale one, using the ITU-R BT.601-7 formula.


[View source]
def width : Int32 #

[View source]
def width=(width : Int32) #

[View source]