Thanks to all... Now it's work...
You are attempting to modify a color at some random memory location, that's
never been allocated (you didn't initialize colore) and then you passed
this dodgy pointer to gimp_by_color_select. In most parts of the GIMP,
GimpRGB are statically allocated,
I have modified the code as you suggested:
GimpRGB *colore;
GimpChannelOps parametri;
gboolean success;
gimp_rgb_set_uchar(colore, pixel[0], pixel[1], pixel[2]);
parametri = GIMP_CHANNEL_OP_REPLACE;
success =
On 10/19/07, Giuseppe Pasquino [EMAIL PROTECTED] wrote:
I have modified the code as you suggested:
GimpRGB *colore;
GimpChannelOps parametri;
gboolean success;
gimp_rgb_set_uchar(colore, pixel[0], pixel[1], pixel[2]);
parametri =
Thanks to all for the useful help... I'll write this function but it return a
fatal error (SEGMENTATION FAULT) and it don't make the selection...
Here is the code:
static void evidenzia (GimpDrawable *drawable, GimpPreview *preview){
gint width, height; //dell'immagine su cui va
gimp_run_procedure() is not properly terminated with GIMP_PDB_END (see
documentation). Again, as Sven said, use c wrappers if they are
available for procedure that you need.
On 10/18/07, Giuseppe Pasquino [EMAIL PROTECTED] wrote:
Thanks to all for the useful help... I'll write this function but
Ok, I'll modify the plugin in this way:
static void evidenzia (GimpDrawable *drawable,
GimpPreview *preview)
{
gint width, height; //dell'immagine su cui va applicato il plugin
gint altezza, larghezza; //numero di pixel formanti la palette
gint x1,
Hi,
why don't you just do what we suggested? If you would use
gimp_by_color_select() instead of gimp_run_procedure(), the compiler
would be able to tell you that your code is buggy.
Sven
___
Gimp-developer mailing list
Because I have problem converting the guchar vector for the color in GimpRGB
and I don't know how manage with GimpChannelOps...
Can you write me down an example?
Subject: RE: RE: [Gimp-developer]
calling a procedure in a plugin From: [EMAIL PROTECTED
Hi,
On Thu, 2007-10-18 at 15:05 +0200, Giuseppe Pasquino wrote:
Because I have problem converting the guchar vector for the color in
GimpRGB and I don't know how manage with GimpChannelOps...
I think I already pointed you to the API reference for GimpRGB and
gimp_rgb_set_uchar() in particular.
Hi,
On Tue, 2007-10-16 at 13:04 +0200, Giuseppe Pasquino wrote:
after few operations, it picks a color from the image (with che
function gimp_pixel_rgn_get_pixel) to get the guchar value of the
components of the related color.
At this point, I need to call the gimp_by_color_select procedure
Hi,
On Tue, 2007-10-16 at 17:02 +0300, Aurimas Juška wrote:
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimp.html#gimp-run-procedure
Procedure parameters:
http://www.goof.com/pcg/marc/pdb/gimp_by_color_select.html
Thanks for your attempt to help. But please don't point people to the
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimp.html#gimp-run-procedure
Procedure parameters:
http://www.goof.com/pcg/marc/pdb/gimp_by_color_select.html
But it is generally easier to lookup params in procedure browser.
On 10/16/07, Giuseppe Pasquino [EMAIL PROTECTED] wrote:
Hello, I'm
Thanks for your help... I have another question: how can I convert a guchar
value taken by gimp_pixel_rgn_get_pixel to COLOR?
Date: Tue, 16 Oct 2007 17:02:15 +0300 From: [EMAIL PROTECTED] To: [EMAIL
PROTECTED] Subject: Re: [Gimp-developer] calling a procedure in a plugin
CC: gimp-developer
13 matches
Mail list logo