Image.copy

Image copy(int newWidth = 0, int newHeight = 0)

Creates a copy of the image, optionally scaled.

Parameters

newWidthNew width (0 = same as original)
newHeightNew height (0 = same as original)

Returns

New Image object, or null on failure