class Pluto::ImageRGBA
- Pluto::ImageRGBA
- Pluto::Image
- Reference
- Object
Included Modules
- Pluto::Format::JPEG
- Pluto::Format::PNG
- Pluto::Format::PPM
- Pluto::Format::Stumpy
- Pluto::Format::WebP
- Pluto::Operation::BilinearResize
- Pluto::Operation::BoxBlur
- Pluto::Operation::Brightness
- Pluto::Operation::ChannelSwap
- Pluto::Operation::Contrast
- Pluto::Operation::Crop
- Pluto::Operation::GaussianBlur
- Pluto::Operation::HorizontalBlur
- Pluto::Operation::Padding
- Pluto::Operation::Rotation
- Pluto::Operation::VerticalBlur
Defined in:
pluto/format/jpeg.crpluto/format/png.cr
pluto/format/webp.cr
pluto/image_rgba.cr
Constructors
- .from_jpeg(image_data : Bytes) : self
- .from_jpeg(io : IO) : self
- .from_png(image_data : Bytes) : self
- .from_png(io : IO) : self
- .from_ppm(image_data : Bytes) : self
- .from_ppm(io : IO) : self
- .from_webp(image_data : Bytes) : self
- .from_webp(io : IO) : self
- .new(red : Array(UInt8), green : Array(UInt8), blue : Array(UInt8), alpha : Array(UInt8), width : Int32, height : Int32)
Class Method Summary
Instance Method Summary
- #[](channel_type : ChannelType) : Array(UInt8)
- #[]=(channel_type : ChannelType, channel : Array(UInt8)) : Array(UInt8)
- #alpha : Array(UInt8)
- #alpha=(alpha : Array(UInt8))
- #blue : Array(UInt8)
- #blue=(blue : Array(UInt8))
- #clone : ImageRGBA
- #each_channel(&) : Nil
- #green : Array(UInt8)
- #green=(green : Array(UInt8))
- #height : Int32
- #height=(height : Int32)
- #red : Array(UInt8)
- #red=(red : Array(UInt8))
-
#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.
- #width : Int32
- #width=(width : Int32)
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.new(red : Array(UInt8), green : Array(UInt8), blue : Array(UInt8), alpha : Array(UInt8), width : Int32, height : Int32)
#
Class Method Detail
Instance Method Detail
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.