diff --git a/src/interface.jl b/src/interface.jl index ea1bc55b..419e6fac 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -126,6 +126,12 @@ end Padding options: :buttomRight will place an image at top-left of a frame(dimension x dimension) and fill the rest of the frame with RGB(0,0,0) + + #Example + using FileIO, Images + img = load("test.jpg") + img = eltype(img) != RGB{N0f8} ? RGB.(img) : img # ensure img is in RGB format + rescaled_padded_img = imgScalePadding(img, 1024, paddingType=:buttomRight) """ function imgScalePadding(img::T, dimension::Integer; paddingType::Symbol=:none) where T <:DenseMatrix{RGB{N0f8}} h, w = size(img) # high = vertical length, width = horizonal length