GfxResizeAndOpenImage (open)
Resize an image with a given resizing method
Syntax
LOADLIB "wh::graphics/canvas.whlib";
RECORD FUNCTION GfxResizeAndOpenImage(RECORD fileinfo, RECORD resizemethod)Parameters
RECORD fileinfoWrapped input image blob (i.e. WrapBlob, or ScanBlob with an added 'data' cell)
RECORD resizemethodThe resize method properties, all cells but the 'method' cell are optional
bgcolorThe background color to use (an integer value as returned by GfxCreateColor or a CSS string color value). Default color is white.
formatOutput format. If empty, format is not changed. Otherwise one of "image/jpeg", "image/gif" or "image/png" will be used
methodThe method to use, one of "none", "fit", "scale", "fitcanvas", "scalecanvas", "fill" or "stretch"
setheightHeight to set, in pixels.
setwidthWidth to set, in pixels.
Return value
RECORD