GraphicsFormats Xojo Plugin for Console targets

PngImporterConsole.GetInfoFromString Method (console only)

Reads image size and metadata from PNG that is stored in a string without reading the whole image.

GetInfoFromString(
   data as String,
   width as Integer,
   height as Integer) as Boolean

Parameters

data
The string data containing a PNG image to import image info from.
width
ByRef parameter that returns the width of the image. This parameter is left untouched if the function returns false.
height
ByRef parameter that returns the height of the image. This parameter is left untouched if the function returns false.

Returns

Boolean
Returns true if it was successful reading size and metadata, else false in which case the file is probably invalid png file.

Remarks

Width and Height are returned in the ByRef parameter of this function. Other metadata will be available on the class properties if the function returns true and if the png image contained some of the meta data properties.

See Also

PngImporterConsole Class