Version 0.60.0

image

A pixel image.

Signatures

  •   image( file imgfile )

Details

Represents a pixel image that can be loaded from a file (jpg or png).

Example

 image img( "kodim01.jpg" )
 echo( img.width + "px x " + img.height + "px" )
 

Output

 768px x 512px
 

Remark

In the current version, the image width and height cannot be enlarged but only reduced.

Members

int width

Allows to read/write the width (in pixels) of the image.

int height

Allows to read/write the height (in pixels) of the image.

resize( int width, int height )

Resizes the image to the given width and height in pixels.

invert()

Applies a color inversion to the image.

Parameters

imgfile

The image file.

See also

🗙

Search results for