imagegetpixel Image Processing Opcodes imagegetpixel imagegetpixel Return the RGB pixel values of a previously opened or created image. Description Plugin 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/plugins Return the RGB pixel values of a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate. Syntax ared, agreen, ablue imagegetpixel iimagenum, ax, ay kred, kgreen, kblue imagegetpixel iimagenum, kx, ky Initialization iimagenum -- the reference of the image. It should be a value returned by imageload or imagecreate. Performance ax (kx) -- horizontal pixel position (must be a float from 0 to 1). ay (ky) -- vertical pixel position (must be a float from 0 to 1). ared (kred) -- red value of the pixel (mapped to a float from 0 to 1). agreen (kgreen) -- green value of the pixel (mapped to a float from 0 to 1). ablue (kblue) -- blue value of the pixel (mapped to a float from 0 to 1). Examples Here is an example of the imagegetpixel opcode. It uses the files imagegetpixel.csd, imageOpcode01.png and imageOpcode02.png. Example of the imagegetpixel opcode. Here is what the images imageOpcode01.png and imageOpcode02.pngfor the imagegetpixel example look like: Here is a musical example of the imagegetpixel opcode. It uses the files imagegetpixel-musical.csd and imageOpcode03.png. Example of the imagegetpixel opcode. This is what the image imageOpcode03.png for the imagegetpixel-musical example looks like: See also Image processing opcodes Credits Author: Cesare Marilungo New in version 5.08