Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter TenGraphic and Image Functions (continued)

ImageExportPNG Function

Overview

The ImageExportPNG function exports an image as a Portable Network Graphic (PNG) file.

Syntax/Parameters

Syntax

int = ImageExportPNG ( handle hImage, string filename, [int compress], [dword transparent] );

Parameters

hImage

A handle to an Image Object.

filename

A string containing a fully qualified filename with path.

compress

An optional int specifying the compression level of the image. The value can be from 1 (least compression) to 9 (best compression) with 6 being default.

transparent

An optional dword that specifies an RGB color that is used for transparency.

Return Value

Returns an int value as ERROR_NONE or a formatted error code.

Remarks

Portable Network Graphics (PNG), is a raster graphics file format that supports lossless data compression. PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK.

The compress parameter sets the aggressiveness of the compression. This value does not affect the viewing of the image. Depending on the content of the image, this value may have little effect on the result file size. Also, Legato Image objects have limited support for alpha channel and no support for animation.

Note that PNG format cannot be used as an EDGAR format.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic