GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Ten — Graphic and Image Functions (continued)
Overview
The ImageResizePixels function resizes an Image object based on a pixel value.
Syntax/Parameters
Syntax
int = ImageResizePixels ( handle hImage, [int size] | [int width, int height] );
Parameters
hImage
A handle to an Image Object.
size
An integer specifying size in pixels to enlarge or reduce the image. When a single parameter is used, the aspect ratio is maintained.
width height
Two integers specifying size in pixels to enlarge or reduce the image for width and height separately. When both are used, the aspect ratio is not maintained unless height and width change in the same ratio as compared to the original size.
Return Value
Returns an int value as ERROR_NONE or a formatted error code.
Remarks
The ImageResizePixels function operates in one of two ways: either the function is supplied a single size parameter or it is supplied both a width and a height parameter. In the first case, the function resizes the image based on the larger dimension of the image. For example, if the original image is 50 pixels by 100 pixels and a value of 300 is passed to the function, the resultant image will be 150 pixels by 300 pixels. The aspect ratio is maintained. If two sizing parameters are passed to the function, it will resize the image’s height and width accordingly, and it is up to the programmer to maintain the aspect ratio.
Note that resizing the image requires two chunks of memory: memory for the existing image and new memory for the new image. This can result in memory errors if the result plus the source is too large. Because of the nature of the operation the memory must be contiguous.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.