ph_convertimage PowerHome formula function
Description
Converts a graphic file from one format to another and/or resizes the graphic.
Syntax
ph_convertimage ( source, dest, width, height )
Argument Description
source String. The path and filename of the graphic file to convert.
dest String. The path and filename to save the converted graphic to.
width Long. The new width for the saved graphic file.
height Long. The new height for the saved graphic file.
Return value
Integer. Returns -1 if the source graphic type cannot be determined. Returns -2 if the dest graphic type is not supported. Returns 0 otherwise.
Usage
The graphic type of the source file is determined first by the data in the file and then by the filename. The graphic type to save as is determined solely by the dest filename. If you don't wish to resize the graphic, then use a value of 0 for both the width and height. Using width and height values greater than 0 will cause the saved graphic to be resized. Supported save filetypes are BMP, JPEG, PNG, TIFF, WBMP, and GIF.