CrImage::Pipeline
Inherits Reference / Object
Pipeline provides a fluent API for chaining image operations.
Allows building complex image processing workflows in a readable, chainable manner without intermediate variables.
Example:
result = CrImage::Pipeline.new(img)
.resize(800, 600)
.brightness(1.2)
.contrast(1.1)
.blur(2)
.result
Constructors
new(source : Image)
SourceInstance methods
brightness(adjustment : Int32) : self
Adjust brightness (adjustment is added to each channel, -255 to 255).
contrast(factor : Float64) : self
Adjust contrast (factor 0.0 to 2.0, where 1.0 is no change).
draw_bezier(x1 : Int32, y1 : Int32, cx : Int32, cy : Int32, x2 : Int32, y2 : Int32, color : Color::Color, thickness : Int32 = 1) : self
Draw a bezier curve.
draw_circle(cx : Int32, cy : Int32, radius : Int32, color : Color::Color, fill : Bool = true) : self
Draw a circle.
draw_dashed_line(x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32, color : Color::Color, dash : Int32 = 5, gap : Int32 = 3) : self
Draw a dashed line.
draw_line(x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32, color : Color::Color, thickness : Int32 = 1) : self
Draw a line.
draw_polygon(cx : Int32, cy : Int32, radius : Int32, sides : Int32, color : Color::Color, fill : Bool = true) : self
Draw a regular polygon.
draw_rect(x : Int32, y : Int32, width : Int32, height : Int32, color : Color::Color) : self
Draw a filled rectangle.
draw_rounded_rect(x : Int32, y : Int32, width : Int32, height : Int32, color : Color::Color, corner_radius : Int32) : self
Draw a rounded rectangle.