module CrImage::Operation::Pad

Overview

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

Direct including types

Defined in:

cr-image/operation/pad.cr

Instance Method Summary

Instance Method Detail

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

[View source]
def pad!(all : Int32 = 0, *, top : Int32 = 0, bottom : Int32 = 0, left : Int32 = 0, right : Int32 = 0, pad_type : EdgePolicy = EdgePolicy::Black) : self #

[View source]