imagesizeImage Processing Opcodesimagesizeimagesize
Return the width and height of a previously opened or created image.
DescriptionPlugin opcode in image. This opcode is part of the plugin repository and has to be installed separately.
The plugin repository can be found here: https://github.com/csound/pluginsReturn the width and height of a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate.
Syntaxiwidth, iheight imagesize iimagenumInitializationiimagenum -- the reference of the image.. It should be a value returned by imageload or imagecreate.
iwidth -- image width.
iheight -- image height.
Examples
Here is an example of the imagesize opcode. It uses the file imageopcodes.csd and imageOpcode01.png.
Example of the imagesize opcode.
Its output should include a line like this:
width = 512 pixels, heigth = 512 pixels
See alsoImage processing opcodesCreditsAuthor: Cesare MarilungoNew in version 5.08