中间件,开发工具,实时操作系统软件和支持服务,助您完成卓越的嵌入式设计
Home
Developer Resources

PiSetPixel

PDF Documents
More resources

PiSetPixel()

Alter the value of a pixel within an image

Synopsis:

int PiSetPixel( PhImage_t *image,
                unsigned short x,
                unsigned short y,
                unsigned long value );

Library:

ph

Description:

This function alters the value of a pixel within an image.

The image argument is a pointer to a PhImage_t structure that defines the image to be modified, while the x and y arguments specify the coordinates of the pixel to change.

The value argument specifies the new value of the pixel, and its meaning depends on the image's type. See the documentation for PiGetPixel() to see how this argument is interpreted.

Returns:

0
Success.
-1
An error occurred because the pixel was out of bounds or the image type wasn't recognized.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhImage_t, PiGetPixel(), PiGetPixelFromData(), PiGetPixelRGB(), PiSetPixelInData()

Images in the Raw Drawing and Animation chapter of the Photon Programmer's Guide

 
©2013 QNX Software Systems Limited, a subsidiary of BlackBerry.   BlackBerry Logo