imagegetpixel Image Processing Opcodes imagesetpixel imagesetpixel Set the RGB value of a pixel inside 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 Set the RGB value of a pixel inside a previously opened or created image. An image can be loaded with imageload. An empty image can be created with imagecreate and saved with imagesave. Syntax imagesetpixel iimagenum, ax, ay, ared, agreen, ablue imagesetpixel iimagenum, kx, ky, kred, kgreen, kblue 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 imagesetpixel opcode. It uses the file imagesetpixel.csd and imageOpcode02.png. Example of the imagesetpixel opcode. This is what the image imageOpcode02.png looks like: and these are the new images imageNEW1.png, imageNEW2.png and imageNEW3.png: See also Image processing opcodes Credits Author: Cesare Marilungo New in version 5.08