Re: Plugin that can open a drawable on screen. What am I doing wrong?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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
http://pastebin.com/m35f95e3e

> 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
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux