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 fileinfo
Wrapped input image blob (i.e. WrapBlob, or ScanBlob with an added 'data' cell)
RECORD resizemethod
The resize method properties, all cells but the 'method' cell are optional
bgcolor
The background color to use (an integer value as returned by GfxCreateColor or a CSS string color value). Default color is white.
format
Output format. If empty, format is not changed. Otherwise one of "image/jpeg", "image/gif" or "image/png" will be used
method
The method to use, one of "none", "fit", "scale", "fitcanvas", "scalecanvas", "fill" or "stretch"
setheight
Height to set, in pixels.
setwidth
Width to set, in pixels.
Return value
RECORD