RestOC.Resize module¶
Resize
Common functions for resizing dimensions to fit, to crop, etc
-
RestOC.Resize.
crop
(w, h, bw, bh)¶ Crop
Makes sure one side fits and crops the other
- Parameters
w (int) – The current width
h (int) – The current height
bw (int) – The boundary width
bh (int) – The boundary height
- Returns
dict
-
RestOC.Resize.
fit
(w, h, bw, bh)¶ Fit
Makes sure one side fits and makes the other smaller than necessary
- Parameters
w (int) – The current width
h (int) – The current height
bw (int) – The boundary width
bh (int) – The boundary height
- Returns
list [w, h]
-
RestOC.Resize.
region
(w, h, bw, bh)¶ Region
Returns a new set of region points based on a current width and height and the bounding box
- Parameters
w (int) – The current width
h (int) – The current height
bw (int) – The boundary width
bh (int) – The boundary height
- Returns
dict