update doc
This commit is contained in:
@@ -126,6 +126,12 @@ end
|
|||||||
Padding options:
|
Padding options:
|
||||||
:buttomRight will place an image at top-left of a frame(dimension x dimension) and fill
|
: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)
|
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}}
|
function imgScalePadding(img::T, dimension::Integer; paddingType::Symbol=:none) where T <:DenseMatrix{RGB{N0f8}}
|
||||||
h, w = size(img) # high = vertical length, width = horizonal length
|
h, w = size(img) # high = vertical length, width = horizonal length
|
||||||
|
|||||||
Reference in New Issue
Block a user