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
Members
- int width
-
Returns the width (in pixels) of the image.
- int height
-
Returns 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.