> No you got an error. 0, or FALSE, means "error" which you can read in the
> documentation for the function:
> http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpdrawable.html#gimp-drawable-set-pixel

Now I see =) And now I get my red pixel as I wanted =)

  gboolean s;
  guint8 pixel[] = { 0xff, 0, 0, 0xff };
  s = gimp_drawable_set_pixel (layer, 5, 5, 4, (guint8 *)pixel );
  printf ("Was the pixel set?: %i", s);

Full source at

> 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.

The thing is, what I would really like is to be able to plot 16bit
(doubles), but I can't figure out, how to put that in, when in my
case, pixel[], is guint8.

So if I set bpp to 32, and I have a 16bit value. How should I put that in?
Gimp-developer mailing list

Reply via email to