Re: [Gimp-developer] Nice new feature for gimp
Alexandre Prokoudine wrote: > On 10/19/07, radar.map35 wrote: > >> Liquid rescale sounds nice but is only for rescaling. This feature would >> also be nice just having in windows resizing in order to keep the >> important objets "safe" while working. >> > > Liquid Rescale plug-in allows both preserving and deleting objects. > See demo of liquid rescale here: http://meetthegimp.org/episode-14-liquid-rescaling-seam-carving-and-cows/ ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Nice new feature for gimp
On 10/19/07, radar.map35 wrote: > Liquid rescale sounds nice but is only for rescaling. This feature would > also be nice just having in windows resizing in order to keep the > important objets "safe" while working. Cedric, Liquid Rescale plug-in allows both preserving and deleting objects. Alexandre ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Nice new feature for gimp
i can't build, smh.h missing :( Liquid rescale sounds nice but is only for rescaling. This feature would also be nice just having in windows resizing in order to keep the important objets "safe" while working. pygmee ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
On Thu, 18 Oct 2007 18:38:46 +0200 Sven wrote: > At least not as far as I know. If you can show that it > can be done, fine. Otherwise it is futile to discuss this further. thanks alot anyway, I'd see if there's anything around... -- Matteo 'Peach' Pescarin Jabber ID = [EMAIL PROTECTED] Web Site = http://www.smartart.it GeCHI = http://www.gechi.it ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
Hi, On Thu, 2007-10-18 at 18:26 +0200, The Peach wrote: > so the only way I can get the right cursor image is using the > screenshot for the whole desktop, where the GIMP mouse cursor will not > be overridden by the screenshot selector cursor. isn't it? No, that is not going to work. The screenshot plug-in simply has no way to get the cursor image set by other applications. X11 doesn't provide an API for this. At least not as far as I know. If you can show that it can be done, fine. Otherwise it is futile to discuss this further. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
On Thu, 18 Oct 2007 18:15:38 +0200 Sven wrote: > Hi, > > On Thu, 2007-10-18 at 18:06 +0200, The Peach wrote: > > > anyway what I was saying is that as long as I've looked, the only way > > IMHO is to grab the cursor pixmap with gdk_cursor_get_image, get the > > cursor's coordinates (don't know how to do that) and then > > "paste" (neither don't know what will be more handy) onto the desktop > > grabbed at the right coordinates. > > is there a bettere way? Did I say something wrong? > > You can only access your own cursor that way (that of the screenshot > plug-in). The point of a screenshot application is though to grab > screenshots of other applications. gdk_cursor_get_image() won't work for > that. so the only way I can get the right cursor image is using the screenshot for the whole desktop, where the GIMP mouse cursor will not be overridden by the screenshot selector cursor. isn't it? this maybe can be avoided if there's a way to wait _after_ having selected the region/window to grab in this case you can return the GIMP cursor. More than that this can help someone to grab desktop sections/windows while using them. > Can we please have such discussions on the list. That's what a developer > mailing-list is for. sorry for such a mess, that's my fault: I started replying to you instead to the ml. -- Matteo 'Peach' Pescarin Jabber ID = [EMAIL PROTECTED] Web Site = http://www.smartart.it GeCHI = http://www.gechi.it ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
Hi, On Thu, 2007-10-18 at 18:10 +0200, The Peach wrote: > anyway what I was saying is that as long as I've looked, the only way > IMHO is to grab the cursor pixmap with gdk_cursor_get_image, get the > cursor's coordinates (don't know how to do that) and then > "paste" (neither don't know what will be more handy) onto the desktop > grabbed at the right coordinates. > is there a bettere way? Did I say something wrong? You can only access your own cursor that way (that of the screenshot plug-in). The point of a screenshot application is though to grab screenshots of other applications. gdk_cursor_get_image() won't work for that. Did you check if kscreenshot does actually show the correct cursor? I suspect what they are doing is to simply paste a default cursor image on the screenshot. You can already do that easily in GIMP after you have taken the screenshot. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
On Thu, 18 Oct 2007 17:49:22 +0200 Sven wrote: > If it was that simple, we would have added support for it already. As > far as I know there is no portable way to access the cursor graphics. > Perhaps you should have a look at kscreenshot and check what they are > doing. gnome-screenshot does not grab the mouse pointer? anyway what I was saying is that as long as I've looked, the only way IMHO is to grab the cursor pixmap with gdk_cursor_get_image, get the cursor's coordinates (don't know how to do that) and then "paste" (neither don't know what will be more handy) onto the desktop grabbed at the right coordinates. is there a bettere way? Did I say something wrong? PS: I always forget to check the recipient list :-\ -- Matteo 'Peach' Pescarin Jabber ID = [EMAIL PROTECTED] Web Site = http://www.smartart.it GeCHI = http://www.gechi.it ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] screenshot with mousepointer
Hi, On Thu, 2007-10-18 at 15:59 +0200, The Peach wrote: > is it possible that the only tool that will make screenshots including > the mouse pointer is kscreenshot, while the GIMP can't??? If you say so... Feel free to contribute a patch. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] screenshot with mousepointer
is it possible that the only tool that will make screenshots including the mouse pointer is kscreenshot, while the GIMP can't??? -- Matteo 'Peach' Pescarin Jabber ID = [EMAIL PROTECTED] Web Site = http://www.smartart.it GeCHI = http://www.gechi.it ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] calling a procedure in a plugin
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. GimpChannelOps is an enum and the possible values are listed in the API reference. Just follow the link. You can also save yourself the hassle of working with pixel regions if all you want to do is to get the color of a single pixel. There's gimp_drawable_get_pixel() for that purpose. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] calling a procedure in a plugin
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]> To: [EMAIL PROTECTED]> CC: gimp-developer@lists.xcf.berkeley.edu> Date: Thu, 18 Oct 2007 14:32:05 +0200>> 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>> _ Scarica GRATIS le emoticon della tua squadra del cuore e il calendario di serie A! http://www.emoticons-livemessenger.com/pages/msnitcalcio/index.htm ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] calling a procedure in a plugin
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 Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] calling a procedure in a plugin
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, x2, y1, y2; GimpPixelRgn rgn_in, rgn_out; guchar pixel[4]; guchar colore[3]; gint i, channels; gint distanza; GimpParam *return_vals; gint nreturn_vals; gboolean success; if (preview) return; else gimp_progress_init ("Evidenzia Temperatura..."); //Recupero del drawable gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2); width = x2 - x1; height = y2 - y1; /* Inizializza due PixelRgns, uno per leggere i dati originali, * e l'altro per scrivere i dati modificati. Il secondo sarà * poi applicato all'immaginne alla fine attraverso la chiamata * gimp_drawable_merge_shadow() */ gimp_pixel_rgn_init (&rgn_in, drawable, x1, y1, width, height, FALSE, FALSE); gimp_pixel_rgn_init (&rgn_out, drawable, x1, y1, width, height, preview == NULL, TRUE); //Recupero del numero di canali channels = gimp_drawable_bpp (drawable->drawable_id); //Calcolo delle dimensioni della palette altezza = termogramma.palettey2 - termogramma.palettey1; larghezza = termogramma.palettex2 - termogramma.palettex1; /* * Se l'altezza è più grande della larghezza allora vuol dire che la palette è disposta in verticale. * Se succede il contrario allora la palette è disposta in orizzontale */ if(altezza> larghezza) { g_print("1\n"); //Ottengo il colore alla temperatura specificata. Lo faccio facendo una media tra tutti i colori che si trovano sulla stessa riga distanza = (termogramma.tempselezionata - termogramma.tempmin) * altezza / (termogramma.tempmax - termogramma.tempmin); //Ottengo il pixel corrispondente (coordinate x1 + (x2 - x1)/2, (y2 - distanza)) gimp_pixel_rgn_get_pixel(&rgn_in, pixel, termogramma.palettex1 + (termogramma.palettex2 - termogramma.palettex1)/2, termogramma.palettey2 - distanza); g_print("%i, %i\n", termogramma.palettex1 + (termogramma.palettex2 - termogramma.palettex1)/2, termogramma.palettey2 - distanza); } else {//larghezza> altezza g_print("2\n"); distanza = (termogramma.tempselezionata - termogramma.tempmin) * larghezza / (termogramma.tempmax - termogramma.tempmin); //Ottengo il pixel corrispondete (coordinate (x1 + distanza), y1 + (y2 - y1)/2) gimp_pixel_rgn_get_pixel(&rgn_in, pixel, termogramma.palettex1 + distanza, termogramma.palettey1 + (termogramma.palettey2 - termogramma.palettey1)/2); g_print("%i, %i\n", termogramma.palettex1 + distanza, termogramma.palettey1 + (termogramma.palettey2 - termogramma.palettey1)/2); } for(i = 0; i < 3; i++) { colore[i] = pixel[i]; g_print("%i ",colore[i]); } return_vals = gimp_run_procedure ("gimp-by-color-select", &nreturn_vals, GIMP_PDB_DRAWABLE, drawable->drawable_id, GIMP_PDB_COLOR, pixel, GIMP_PDB_INT32, termogramma.scarto, GIMP_PDB_INT32, 2, GIMP_PDB_INT32, FALSE, GIMP_PDB_INT32, FALSE, GIMP_PDB_FLOAT, 0.0, GIMP_PDB_INT32, FALSE, GIMP_PDB_END); success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS; //si distruggono i parametri per liberare la memoria gimp_destroy_params (return_vals, nreturn_vals); if(success) g_print("Fatto\n"); } the variable success is TRUE after calling the procedure but it select every black pixel instead the values contained in the "colori" vector. It' is a bug or I'm make some mistakes? _ Crea i tuoi biglietti da visita con Windows Live Messenger! http://www.messenger.it/biglietti_da_visita.html ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Ber
Re: [Gimp-developer] calling a procedure in a plugin
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 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 applicato il plugin > gint altezza, larghezza; //numero di pixel formanti la palette > gint x1, x2, y1, y2; > GimpPixelRgn rgn_in, rgn_out; > guchar pixel[4]; > guchar colore[3]; > gint i, channels; > gint distanza; > GimpParam *return_vals; > gint nreturn_vals; > > if (preview) return; > else gimp_progress_init ("Evidenzia Temperatura..."); > //Recupero del drawable > gimp_drawable_mask_bounds (drawable->drawable_id, >&x1, &y1, >&x2, &y2); > width = x2 - x1; > height = y2 - y1; > /* Inizializza due PixelRgns, uno per leggere i dati originali, > * e l'altro per scrivere i dati modificati. Il secondo sarà > * poi applicato all'immaginne alla fine attraverso la chiamata > * gimp_drawable_merge_shadow() */ > gimp_pixel_rgn_init (&rgn_in, > drawable, > x1, y1, > width, height, > FALSE, FALSE); > gimp_pixel_rgn_init (&rgn_out, > drawable, > x1, y1, > width, height, > preview == NULL, TRUE); > //Recupero del numero di canali > channels = gimp_drawable_bpp (drawable->drawable_id); > > //Calcolo delle dimensioni della palette > altezza = termogramma.palettey2 - termogramma.palettey1; > larghezza = termogramma.palettex2 - termogramma.palettex1; > /* > * Se l'altezza è più grande della larghezza allora vuol dire che la > palette è disposta in verticale. > * Se succede il contrario allora la palette è disposta in > orizzontale > */ > if(altezza > larghezza) { > //g_print("1\n"); <- for debug purpose > //Ottengo il colore alla temperatura specificata. Lo faccio > facendo una media tra tutti i colori che si trovano sulla stessa riga > distanza = (termogramma.tempselezionata - > termogramma.tempmin) * altezza / (termogramma.tempmax - > termogramma.tempmin); > //Ottengo il pixel corrispondente (coordinate x1 + (x2 - > x1)/2, (y2 - distanza)) > gimp_pixel_rgn_get_pixel(&rgn_in, pixel, > termogramma.palettex1 + (termogramma.palettex2 - termogramma.palettex1)/2, > termogramma.palettey2 - distanza); > g_print("%i, %i", termogramma.palettex1 + > (termogramma.palettex2 - termogramma.palettex1)/2, termogramma.palettey2 - > distanza); > } > else {//larghezza > altezza > //g_print("2\n"); debug > distanza = (termogramma.tempselezionata - > termogramma.tempmin) * larghezza / (termogramma.tempmax - > termogramma.tempmin); > //Ottengo il pixel corrispondete (coordinate (x1 + > distanza), y1 + (y2 - y1)/2) > gimp_pixel_rgn_get_pixel(&rgn_in, pixel, > termogramma.palettex1 + distanza, termogramma.palettey1 + > (termogramma.palettey2 - termogramma.palettey1)/2); > //g_print("%i, %i", termogramma.palettex1 + distanza, > termogramma.palettey1 + (termogramma.palettey2 - termogramma.palettey1)/2); > debug > } > for(i = 0; i < 3; i++) colore[i] = pixel[i]; > return_vals = > gimp_run_procedure("gimp_by_color_select", > &nreturn_vals, > GIMP_PDB_DRAWABLE, > drawable,//drawable > GIMP_PDB_COLOR, > colore, //color > GIMP_PDB_INT32, > termogramma.scarto, //threshold > GIMP_PDB_INT32, 2, > //operation > GIMP_PDB_INT32, 0, > //antialiasing > GIMP_PDB_INT32, 0, > GIMP_PDB_INT32, 0, > GIMP_PDB_FLOAT, > 0.0, > GIMP_PDB_INT32, > 0); > > } > > What's wrong with this code? > > > Sfida i tuoi amici in entusiasmanti sfide con i giochi di Messenger! > Messenger Giochi > ___
Re: [Gimp-developer] calling a procedure in a plugin
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 applicato il plugingint altezza, larghezza; //numero di pixel formanti la palettegint x1, x2, y1, y2;GimpPixelRgn rgn_in, rgn_out;guchar pixel[4]; guchar colore[3];gint i, channels;gint distanza; GimpParam *return_vals;gint nreturn_vals;if (preview) return;else gimp_progress_init ("Evidenzia Temperatura..."); //Recupero del drawablegimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);width = x2 - x1;height = y2 - y1; /* Inizializza due PixelRgns, uno per leggere i dati originali, * e l'altro per scrivere i dati modificati. Il secondo sarà * poi applicato all'immaginne alla fine attraverso la chiamata* gimp_drawable_merge_shadow() */gimp_pixel_rgn_init (&rgn_in, drawable, x1, y1, width, height, FALSE, FALSE); gimp_pixel_rgn_init (&rgn_out, drawable, x1, y1, width, height, preview == NULL, TRUE); //Recupero del numero di canalichannels = gimp_drawable_bpp (drawable->drawable_id);//Calcolo delle dimensioni della palettealtezza = termogramma.palettey2 - termogramma.palettey1; larghezza = termogramma.palettex2 - termogramma.palettex1; /* * Se l'altezza è più grande della larghezza allora vuol dire che la palette è disposta in verticale. * Se succede il contrario allora la palette è disposta in orizzontale */if(altezza > larghezza) {//g_print("1\n"); <- for debug purpose //Ottengo il colore alla temperatura specificata. Lo faccio facendo una media tra tutti i colori che si trovano sulla stessa rigadistanza = (termogramma.tempselezionata - termogramma.tempmin) * altezza / (termogramma.tempmax - termogramma.tempmin);//Ottengo il pixel corrispondente (coordinate x1 + (x2 - x1)/2, (y2 - distanza)) gimp_pixel_rgn_get_pixel(&rgn_in, pixel, termogramma.palettex1 + (termogramma.palettex2 - termogramma.palettex1)/2, termogramma.palettey2 - distanza);g_print("%i, %i", termogramma.palettex1 + (termogramma.palettex2 - termogramma.palettex1)/2, termogramma.palettey2 - distanza);}else {//larghezza > altezza //g_print("2\n"); debugdistanza = (termogramma.tempselezionata - termogramma.tempmin) * larghezza / (termogramma.tempmax - termogramma.tempmin);//Ottengo il pixel corrispondete (coordinate (x1 + distanza), y1 + (y2 - y1)/2) gimp_pixel_rgn_get_pixel(&rgn_in, pixel, termogramma.palettex1 + distanza, termogramma.palettey1 + (termogramma.palettey2 - termogramma.palettey1)/2); //g_print("%i, %i", termogramma.palettex1 + distanza, termogramma.palettey1 + (termogramma.palettey2 - termogramma.palettey1)/2); debug}for(i = 0; i < 3; i++) colore[i] = pixel[i]; return_vals = gimp_run_procedure("gimp_by_color_select", &nreturn_vals, GIMP_PDB_DRAWABLE, drawable,//drawable GIMP_PDB_COLOR, colore, //color GIMP_PDB_INT32, termogramma.scarto, //threshold GIMP_PDB_INT32, 2, //operation GIMP_PDB_INT32, 0, //antialiasing GIMP_PDB_INT32, 0, GIMP_PDB_INT32, 0, GIMP_PDB_FLOAT, 0.0, GIMP_PDB_INT32, 0); } What's wrong with this code? _ Crea i tuoi biglietti da visita con Windows Live Messenger! http://www.messenger.it/biglietti_da_visita.html___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer