SHIP:Sail:image

From Serious Documentation
Revision as of 13:01, 9 November 2017 by CarltonHeyer (talk | contribs)
Jump to: navigation, search
Function Returns Introduced Description
image Integer v5.1.2 Display an image

See Also:

Prototype

Integer err = image(Node canvas, Node file, Integer result[, Integer posX, Integer posY, Integer offsetX, Integer offsetY, Integer clipW, Integer clipH]);

Parameters/Return Value

Parameter Data Type Description
canvas Node Canvas to draw on
file Node node of file in 8.3 format
result Integer User defined
posX Integer X coordinate on canvas
posY Integer y coordinate on canvas
offsetX Integer x offset to place image
offsetY Integer y offset to place image
clipW Integer image width
clipH Integer image height
Return Integer error code

Detailed Description

This function takes the image pointed to by the string file and displays it on the canvas in the location resolved by position and offset. The image will be clipped according to the clip arguments. Current allowed images are jpeg. An error code of 0 is success.

Supported JPEG Image Features

Feature Specifications
Elements of color 3 colors (YCbCr)
Ratio of sample 4:4:4 (1x1,1x1,1x1)
4:2:2 (2x1,1x1,1x1)
4:2:2 (1x2,1x1,1x1)
4:1:1 (2x2,1x1,1x1)
Input data All data has to be prepared
Clipping of expansion No support
Progressive No support
Exif No support


  • An image with a size larger than the canvas will cause the image not to be rendered at all.

Examples

Example Results Notes
err = image(homeCanvas, fKite, pResult, 0, 0, ow/2, oh/2, 0, 0); 0 Display the pic in the bottom right