module

CrImage::Operation::Pad

Pads an image

Taking sample image:

Woman with black turtleneck and white background
image.pad(left: 50, right: 50)
image.pad(left: 50, right: 50, pad_type: CrImage::EdgePolicy::Repeat)
Picture with black padding on left and right Picture with repeated padding on left and right

Instance methods

pad(all : Int32 = 0, *, top : Int32 = 0, bottom : Int32 = 0, left : Int32 = 0, right : Int32 = 0, pad_type : EdgePolicy = EdgePolicy::Black) : self
Source
pad!(all : Int32 = 0, *, top : Int32 = 0, bottom : Int32 = 0, left : Int32 = 0, right : Int32 = 0, pad_type : EdgePolicy = EdgePolicy::Black) : self
Source