Name

setPixel( ) — set a pixel to a color

Synopsis

GD::Image::setPixel(x, y, colorindex)

The setPixel( ) method will set the color of a given pixel to the color referred to by the colorindex. Use a brush associated with the image (gdBrushedor gdStyledBrushed) to “stamp” the shape of the brush onto the image at the given center point.

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.