Louise Hoffman wrote:
> Now I don't get any errors, but I don't see the pixel either...
>   /* Trying to set a pixel at x=5,y=5 with value 150 in 24 bit color */
>   const guint8 *pixel;
>   pixel = (guint8 *) "150";
>   gboolean s;
>   s = gimp_drawable_set_pixel (layer, 5, 5, 24, pixel);
>   printf ("Was the pixel set?: %i", s);

Hi again!

No you got an error. 0, or FALSE, means "error" which you can read in 
the documentation for the function:


There you can also read that the num_channels parameter shall be the 
"The number of channels for the pixel.". You try to pass the number of 
bits, 24. Even that is wrong since you create the layer with an alpha 
channel, so the correct wrong thing to pass would be 32.

  / Martin


My GIMP Blog:
"Reducing UI clutter, docking bars removed"
Gimp-developer mailing list

Reply via email to