Re: [Gimp-developer] GIMP Developer Meeting #3 - March 28, 2011
Hi, On Sun, Mar 27, 2011 at 3:12 PM, Michael Natterer mi...@gimp.org wrote: So when you write code, how much time do you spend writing the boilerplate? 10%? I would say it's much much less, because writing the code is a small fraction of the time actually spent on the code, the rest is debugging, refactoring, reading and reading it over and over again. The percentage of writing the actual boilerplate rapidly drops to a few percent. Isn't debugging, refactoring and code reading (finding references, going to definition, etc etc -- noone reads code like a book, right?) many times faster in Java or C# IDEs ? AFAIK Vala could be integrated into IDEs (Eclipse, Monodevelop, Valide) in a similar way as Java or C# and provide many benefits that most of the developers use for many years already.. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP won't quit
Hi, On Sun, Feb 27, 2011 at 12:15 AM, Roger Penn roger.p...@gmail.com wrote: I'm using the GIMP to create custom graphics on the fly for a CMS by calling the script from the web page through ASP.NET. For what you want to do, Script-fu server should be the best option. See http://docs.gimp.org/en/gimp-filters-script-fu.html (Section 10.6.4. Start Server). ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Another idea for GSoC: Plugin mixer
Hi, On Fri, Apr 16, 2010 at 10:34 PM, Avgoustinos Kadis avgousti...@gmail.com wrote: Plugin-Mixer: A window that allows you to select a few plugins, put them in order you want them to be applied, modify their parameters and apply them on the current image. The window should allow the user to save the combination and reuse it for other combinations. Why does it have to be limited to plug-ins ? From user POV, there are actions she can make: adjust image levels, blur, etc. Some actions live in core, some in plug-ins, but why should user care where the action is technically implemented ? In some applications often used actions can be combined in the following way: user clicks 'Record', performs adjustments, experiments, undo, experiments again. When she is happy with the result she clicks 'Stop', and has the sequence of operations saved. Note: in order to construct sequence of actions she didn't have to perform any special actions, like drag-dropping plug-ins to a list, but instead work as she usually does (most intuitive way possible). Afterwards she can 'Play' the sequence on any image, on directory of image files, etc. IMO, in order to make serious improvements in this field, there is a need to make the necessary changes in the plug-in API first: plug-in settings implemented in a generic way, so that they could be saved and later restored, etc. See: https://bugzilla.gnome.org/show_bug.cgi?id=101604 . Not that it's related to your project. Just my personal opinion how this should be done correctly. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] More on tagging
Hi, On Wed, Mar 10, 2010 at 10:36 PM, Rob Antonishen rob.antonis...@gmail.com wrote: I found this old thread: http://lists.freedesktop.org/archives/create/2009-February/001578.html That talks about tagging. I've also looked at the source, and am not able to locate how the checksum is calculated. It does not appear to be a md5sum of the actual resource file. How is it calculated? The md5 checksum is calculated after object is loaded. Each tagged object implements GimpTaggedInterface, including method get_checksum (). Therefore, its internal data is used to calculate the checksum, which means different implementation for each resource type. For resource sharing it might be better to calculate md5 checksum on raw file data. However, not all resources are physical files, for example, generated brushes. There has been some effort to create a common tag storage format, see http://create.freedesktop.org/wiki/ResourceTagging . It would be used by graphic applications for tag storage and put in resource packages. There are some ideas, that resources and tags could be shared among graphic applications. However, there is only discussion where shared tags and resources could be put, not how some applications access shared tag list concurrently. There are quite a few things to decide before something can be actually implemented. Regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Paint Dynamics in git version
Hi, 2010/3/10 Rob Antonishen rob.antonis...@gmail.com: What is the format for this? If I wanted to distribute (for example) a set of pre-tagged patterns, could this be done currently in the dev build? There is no such feature yet. The idea is a simple archive of resouces + tags + possibly some metadata. When resource package is dragged on GIMP it would install where necessary. Some tool to create such packages would be good too. However, first tag file format would have to be standardized a bit so that resource packages could be used not only in GIMP. Additional ideas are welcome. Regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Paint Dynamics in git version
Hi, On Sun, Mar 7, 2010 at 5:50 PM, Alexia Death alexiade...@gmail.com wrote: By the way, is there somewhere some explanations about the purpose and use of tags and filters? I think I can guess a large part of this, but reading authorized text would be useful. I doubt there is a text, even less authorized one, on this. Closest you can get is when you find Auris , the author of this feature, in IRC and get him to talk to you. Shouldn't be that complicated tho. you can assign tags to resources and you can use filters to see just the tagged ones. You can go to http://sites.google.com/site/aurijusk/gimp-resource-tagging and choose tagging.pdf. Regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] [PATCH] Use Glade + GtkBuilder for file-png.c save_dialog()
Hi, On Fri, Jan 8, 2010 at 4:30 PM, Martin Nordholts ense...@gmail.com wrote: We need to be aware of that we are introducing extra disk IO which can give us problems, especialy during startup if we have to load a lot of files. In practice I don't think this will be a problem for a long time though, but doesn't hurt to have a mitigation strategy. We could: * Put files as static strings in the code so that we don't have to significant disk IO at all * Merge several files together to minimize disk seeking times for many files Why not to convert XML's to C code when compiling distribution ? XML's are large and not very fast to parse. This approach would have all the benefits of XML's while developing and would not cause additional penalties for release distribution. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Hide progress bar
Hi, On Tue, Oct 6, 2009 at 5:08 PM, Cristi Balas cris...@gmail.com wrote: I have a perl plugin that calls gimp-file-load-layer. and when i call this function, a progress bar apears in the status bar (if the status bar is hidden, then it's temporary made visible). I want my plugin not to display any progress bar / status bar. Is gimp-progress-install function going to help me? if so, how do i use it? You can simply create a hidden GimpProgressBar, which will handle all the difficulties of gimp-progress-install for you. All progress / status info will go to the created GimpProgressBar, but user will not see it. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] TIFF load/save code
Hello, On Thu, Sep 17, 2009 at 3:10 PM, Gary Collins gcatl...@yahoo.co.uk wrote: I'd be grateful if someone could post a link for me directly to the part(s) of the code responsible for loading/saving TIFF format files. http://git.gnome.org/cgit/gimp/tree/plug-ins/common/file-tiff-load.c http://git.gnome.org/cgit/gimp/tree/plug-ins/common/file-tiff-load.c http://git.gnome.org/cgit/gimp/tree/plug-ins/common/file-tiff-save.c ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP in-game feature
Hi, Hold on. There seems to be confusion here. CC and GPL are not compatible, which would be a problem for you. And I don't have the authority to give you permissions to use the logo in any way, I'm not the author of it. Don't you think there is too much confusion, problems and hold on to use one or two free as in speech images in an open source project ? Personally, I think there is no need to bother with such nonsense and simply act freely. Otherwise there can't be even talk of anything more than free as in beer. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] REQ: Mass-tagging of resources?
Hi, On Mon, Aug 17, 2009 at 7:41 AM, Renan Birckrenan.dr...@gmail.com wrote: Is there some way (or, if not, would it be possible to add one) of tagging many resources at the same time? (e.g. doing a multiple-selection and then adding the same tags to all selected ones?) We are aware that this feature is important for resource tagging and it is one of the tasks planned for the 2.8 release. Actually, it is in progress now and should be available soon. However, at the moment it is not possible to tag multiple resources at once as it is not even possible to select multiple items at once. As a temporary workaround, it might be faster to edit tags.xml located in ~/gimp-2.7/ manually using text editor. Regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Resource tagging: future development
Hello, How do we imagine resource tagging in the future GIMP versions? It is already usable as it is, but there are many ideas which may help to make it better or worse. First of all, multiple selection in resource windows. There is not much discussion about it, as some time ago we decided that it is important. I am working on it and it should be ready eventually. It is possible to consider multiple selections for other windows as well (layers, etc), but as Sven stated, it may be opening of can of worms (therefore, later). Considering how tagging could be integrated in other similar applications and shared between them, some new ideas were suggested [1]. Currently tag in GIMP is a simple text string. Therefore, when switching LANG, the tags do not change (strings translated for user's locale are installed once on the first run). It was suggested to make tag a complex object, which contains all the translations all the time: tag keych/key label xml:lang=ensee-aich/label label xml:lang=esche/label /tag The advantage is that tags would be translated correctly whenever user changes language. It is worth considering to share tags between various applications. In such case tags would have to be stored in some shared directory. Also, it is not entirely clear how multiple applications could read/write the same XML file without ever corrupting it? Suggestions please. What resource tagging in GIMP could be in 2.8 and in the later versions? [1] http://create.freedesktop.org/wiki/ResourceTagging ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] What would be a better set of default resources?
hi, On Fri, Jul 24, 2009 at 2:59 PM, Alexia Deathalexiade...@gmail.com wrote: Actually, this is the key point of this discussion and IMHO the RIGHT WAY(TM) to solve this. Editing resources during use should not require write access. Saving the changes should. Use tweaking should be a different level action than actual editing. Its extremely annoying if use level tweaking messes up your resource. If there's quiet auto saving, that should go away. Edit action should be available for writable ones and Duplicate edit(possibly a quiet one) for non-writable ones and should be different from tweaks you can save in tool presets. Let me extend your idea a bit. Every time selecting a resource, a copy of it could be created (in memory, not on physical file). User could edit resource in any way she likes without affecting originally selected resources. GIMP could actually maintain a current-session-brush, current-session-pattern, etc.: when finishing session save currently selected resources (one for each resource type). When starting session only one resource for each type would need to be loaded in synchronously. All other resources could be loaded in background (improve startup time). ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Default tags for GIMP resources
Hi, As you might already know, GIMP from next version will allow to tag resources (brushes, patterns, etc). It would be nice to create a default tag set for resources provided in a standard GIMP distribution. If someone would like to volunteer, there are following options to create (possibly partial) tag set: * (easier) edit tags from GUI or tags.xml (found in $HOME/.gimp-2.7/tags.xml) file directly and send the tags.xml file to me and I could take care of updating the necessary files in source tree. * (harder) edit gimp/data/tags/gimp-tags-default.xml.in directly. File structure is pretty simple and each entry should look similar to this (resources are already generated, only tags need to be added): resource identifier=gimp-brush-clipboard checksum=157dcef48665ab465439cfaf10d6feeb tag _thetagtest1/_thetag /tag tag _thetagtest2/_thetag /tag tag _thetagtest3/_thetag /tag /resource If you have any questions, feel free to ask. Best regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Tagging thoughts
Hi, On Tue, Jan 13, 2009 at 5:04 PM, jbaker jba...@gimpthoughts.com wrote: 1) Have you thought about assigning a 'default' tag to all of the standard gimp items ? - It would be nice to filter out all of the standard items with one click... There were thoughts to assign default tags (which are neither assigned nor removed by users), such as resource name. Perhaps they could even be translatable. However, it is not obvious how it would be better to implement such functionality. I think resource distribution with tags assigned is one of the questions which should be addressed before GIMP 2.8 release. When GIMP detects new resources, how can it find tags for them (possibly translated) ? It also would be nice to allow user to drag-and-drop resource pack (*.tar.gz or similar) so that all resources with tags assigned would get installed. 2) When a user clicks the refresh button in the palettes, gradients, brush dialog or a script uses any of the 'gimp-*-refresh' procedures, what if gimp would re-read the tags.xml file at that point. That is a good idea. It should probably not reread, but merge with loaded tags as user might have made changes both from GUI and manually in tags.xml. Regards, Aurimas ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] strange tooltip meaning
Hi, It works in both directions: it can be used to create lens distortion or fix it. On Sun, Oct 19, 2008 at 12:06 AM, Cristian Secară [EMAIL PROTECTED] wrote: On the Filters - Distorts - Lens distortion... menu, the tooltip over the Lens distortion says Corrects lens distortion. Isn't this a mistake ? I am expecting that a distortion filter *distorts*, not corrects. Hm ? Cristi ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Tagging of Gimp Resources project status
Hi, On Mon, Jul 14, 2008 at 3:45 AM, David Gowers There is probably a need to import tags when adding a set of patterns. As in, person A packages up eight patterns into a .zip file; They've tagged these patterns with a few things that make universal sense (eg 'stone', 'stippling', or 'hi contrast'). It would help persons B,C and D (users of these patterns) to be able to import tags for those patterns from an existing tag-cache.xml file. This is particularly useful as the number of resources in the packages increases, for example my package of dithering patterns (http://gimpstuff.org/content/show.php/dithering%2Bhalftoning+patterns?content=81817) could definitely benefit from it. I am assuming that tag-cache.xml can easily be filtered by a script to contain only information about the items that are being distributed. So I envision a package containing something like blackgranite.pat diamondstippling.pat electricity.pat mypackagename-tags.xml and when the user initially unpacks the package, they import the tags. If they later want to recover the tags (since they may have deleted some of them from their own tags.) they can import the tags again. Do you have a plan to address importation of tags? It is planned to create a platform independent resource file export and import functionality. One user exports some resources to a package (tags associated with resources are also stored in the package). Other user can import resources from the package together with their assigned tags. I'm sure you have a plan to provide tag renaming -- this would be helpful for i18n, allowing a person to easily rename the original tag to something in their preferred language. eg 'stippling' - 'miksiĝi desino' Yes, it will surely be possible. Do you plan to implement NOT filtering? as in 'dithering -diamond' filtering for patterns tagged 'dithering' that are not tagged 'diamond'. I haven't thought of it yet but it seems a good idea. Also, currently there is only AND search in tag queries. Maybe it would be good to add even more flexibility to advanced users. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Tagging of Gimp Resources project status
Hi, Tagging of Gimp Resources project is an attempt to make it easy and efficient to organize Gimp resources (brushes, patterns, gradients, palettes). Currently the project is already somewhat usable, allowing user to assign tags, filter resources on selected tags, preserve tags between session and more. Screenshots [1] and [2] show how resource (brush, etc) docks look. As you can see, there are two tag entries: the one on top is to filter based on selected tags, on the bottom is for tag assignment. Tags can be typed with keyboard [1] (specifically for tagging a special autocompletion was implemented: autocompletes tags even in the middle of tag list, doesn't offer already selected tags, etc) and selected with some pointing device [2] (popup window stays open to allow multiple tag selection, it can be closed by clicking somewhere outside). Tags cache is stored in tag cache file (~/.gimp-2.5/.tag-cache.xml). The file is user editable, but that is normally not needed. Should user rename or move resource file(s) (brushes, etc), tag cache would detect changes based on file contents and correctly remap tags. Source code is available: svn://svn.gnome.org/svn/gimp/branches/soc-2008-tagging. Questions, comments and recommendations are appreciated. [1] http://img137.imageshack.us/img137/829/autocompletioniw0.png [2] http://img175.imageshack.us/img175/7020/popupcg7.png ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] An idea for resource management
Hi, On Mon, May 19, 2008 at 2:05 AM, Robert Krawitz [EMAIL PROTECTED] wrote: Currently, in order to use a custom brush/gradient/etc, you must first create it, then edit/save/etc. Every time you want a new brush you have to create a new one, even if it is a temporary brush. Instead why not have the 'active' brush (and gradient,etc) always be user editable, saved between sessions. How would you restore the original version of the brush, in case you edited it accidentally? How I understand the idea, the 'active brush' is a copy of the brush that you've selected. So you can play with it in any way you like without breaking the original brush (which could be a read-only file, btw). Workflow could be something like the following: 1. Select a brush. A copy of it is created transparently to the user. 2. User can easily edit the brush for her needs. 3. Paint something 4. (optionally) Save the brush to disk. 5. Select another brush. A copy of it is created transparently to the user. Previous 'current brush' is lost. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] A simple (?) question...
Hi Torsten, Some gimp plug-ins provide random seed value to user. This way user is able to play with the random value and to reproduce the same effect later, i.e. for tutorials. I am aware of that. The point is, that the function is a random but - according to it's documentation should behave identically for identical images. The idea behind this is, that you should be able to recreate the same effect on the same image - even if there is such a thing called random. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Broken blending
Hi, On Feb 11, 2008 9:29 AM, Sven Neumann [EMAIL PROTECTED] wrote: You aren't perhaps working with an image in Indexed mode, are you? Yes, my fault. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] tagged resources such as brushes, gradients, etc
Is it possible that one physical file could represent more than one resource? Let's say, some file format of other application which contains multiple brushes. Or some file format which contains multiple types of resources (brushes, patterns, etc). If such case should be handled, we could look at such file as some special kind of directory: /home/aaa/_favorites.col#brush1 This way it should be possible to handle various collection formats from other application. About sharing resources: There was a suggestion, that when user want's to share resources, they could be exported to some kind of archive. If collection handling would be supported, it would be possible for user to access archive directly and for administrator to put some archives to read-only network folder and user could load those resources without the need of extracting and copying to local folder. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] tagged resources such as brushes, gradients, etc
On Jan 18, 2008 9:55 AM, Sven Neumann [EMAIL PROTECTED] wrote: My current favorite approach is to put the tags into files in the ~/.gimp-2.x directory, one file per resource type. So there would be a brushrc, gradientrc, patternrc and so on. These files will contain metadata from the actual resource files. What data structure could be used to represent this data in application? As I understand, it will be necessary not only to traverse data, but also to update it at runtime (not files, but internal data structures, of course). Wouldn't it be nice to use Sqllite for this instead? The only drawback is that if you remove files, their tags will be kept around forever. They could be discarded after some period, say 90 days. Tags won't make sense forever (because you'll forget why you added them), so there is no point to keep them forever. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] proposal for managing resources such as brushes, gradients, etc
On Jan 17, 2008 7:45 PM, William Skaggs [EMAIL PROTECTED] wrote: 2) If they are stored in a separate database, keyed by file names, then there is a great danger of losing the linkage between tags and object. If, for example, the user renames the directory holding some brushes, all of the tags for those brushes will be lost. The only way to prevent this sort of thing from happening is to make sure that all operations on resource files are mediated by Gimp (or some new utility program) that will make sure to keep the tags in sync with the data files. If for some reason a user's tags database gets corrupted, it will be a major disaster. I don't see any disaster. Here is one possible solution: store some sort of checksum (let's say, MD5) together with filename in the database. Let's say user renames file. If new filename is found with the same checksum, simply change the filename in database and that's it - you've got completely correct database once again. This could be a little more tricky at runtime (scan in background?), but not a disaster, really. ___ 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
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 ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU
Re: [Gimp-developer] calling a procedure in a plugin
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 working on this plugin: 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 but I'm not sure to follow the right way... Anyone can help me? How do I manage the guchar values to convert in GimpRGB? Thanks a lot to all and sorry for my bad English (I'm italian)... Giuseppe. Con Windows Live Messenger condividi file senza limiti di peso! Windows Live Messenger ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] New Splash for 2.4
Interestingly enough, I could never think of a splash screen that would be made for one version (2.4) and imposible to rework for other (2.6). You proved it's possible :) Nonetheless, The Gimp allows everyone to change default splash screen, so you can still make it available to the others. What concerns brushes, I think it would be nice to have links to all known brush, pattern, etc. pages in one central page (or even have resource database). On 9/27/07, Filipe Soares Dilly [EMAIL PROTECTED] wrote: Hi; My name is Filipe Dilly and I'm a digital artist and teacher that uses GIMP for the main image manipulation and painting for about two years. I'm looking for some kind of Splash Screen Contest for the GIMP 2.4. I already did my entry and licensed in CC 3.0: http://filsd.deviantart.com/art/GIMP-2-4-Splash-65909210 . I also made to Packs of brushes (see the description on the link). I also like to thank all the efforts on GIMP, its a Great Program, thank you all. -- Filipe Soares Dilly dilly.carbonmade.com/ ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] plug_in_flush mysterious warning
Do other plug-ins show the same behavior for you? This sounds like a bug in your plug-in. Is there perhaps an idle handler or a timeout still running? I used to add GimpProgressbar in order to stop showing progress of temporary processing in image window (it was just created to capture progress events but not shown). Removing it seems to make the problem disappear. Is there any other way I could hide those temporary messages? ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Solving Bug 356716 – GimpZoom Preview is broken in some plug-ins
Hi, Some plug-ins which are left, are not so easy to fix, so some discussion: * jigsaw -- looks like lot of code would have to be changed to make it work with GimpZoomPreview correctly. However, I don't understand why this plug-in would need zoom preview at all. It doesn't do anything that someone would like to check at high zoom level. My suggestion: use GimpPreview instead. * polar, whirlpinch -- both need fetching pixels. Of course, it's possible to ask core to scale down some part, but I don't think we would like to do that for each pixel. Efficient solution would be to scale small regions (tiles) and cache them. For example, lens is doing that. However, it is not very easy to implement (or copy paste from somewhere) such functionality and I think such functionality should be provided by core. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] plug_in_flush mysterious warning
On 7/16/07, Sven Neumann [EMAIL PROTECTED] wrote: On Fri, 2007-07-13 at 14:50 +0300, Aurimas Juška wrote: While testing my plug-in I noticed, that after quiting the plug-in The Gimp *usually* (but sometimes not, not depending on what you do) prints something like that: plug_in_flush(): broken pipe. It seems The Gimp wants to communicate with the plug-in after it's process has terminated. I added g_usleep () right before quiting in order to give The Gimp some time to finish some work. The warning doesn't appear any more. Is it a bug or something? Do other plug-ins show the same behavior for you? This sounds like a bug in your plug-in. Is there perhaps an idle handler or a timeout still running? Yes, it's proly a bug in my plug-in, but not an easy to find, though. Timeout handler was running, but it shouldn't be calling anything gimp_*. I made it to quit after processing, but nothing has changed. Debugging has showed, that The Gimp receives G_IO_HUP (broken pipe). After that wants to kill plug-in, on the way sending it a quit message through the same broken pipe (that's where the warning comes from). What could cause a pipe to broken if plug-in doesn't crash? Test case can be http://registry.gimp.org/plugin?id=8799 . That's quite a lot of code for a test case which makes it hard to say whether it's a problem in libgimp or in your code. It's hard to expect that someone could find time for that. But if someone decides to check, this would envolve commenting g_usleep() in src/webx_main.c to reproduce. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] plug_in_flush mysterious warning
While testing my plug-in I noticed, that after quiting the plug-in The Gimp *usually* (but sometimes not, not depending on what you do) prints something like that: plug_in_flush(): broken pipe. It seems The Gimp wants to communicate with the plug-in after it's process has terminated. I added g_usleep () right before quiting in order to give The Gimp some time to finish some work. The warning doesn't appear any more. Is it a bug or something? Test case can be http://registry.gimp.org/plugin?id=8799 . ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Win32 plugin console window
Hi, How do I change plug-in source tree so that console window wouldn't appear in background (On Win32 platform)? I use gimp-plugin-template, but I may have screwed up something. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Separate+ plug-in
Paste the last l :) http://cue.yellowmagic.info/softwares/separate.html On 6/12/07, Kevin Cozens [EMAIL PROTECTED] wrote: Guillermo Espertino wrote: Separate+ plug-in is available at: http://cue.yellowmagic.info/softwares/separate.htm The server is either down or the URL is bad. I can't access the referenced web page. I just get a 404 error. -- Cheers! Kevin. http://www.ve3syb.ca/ |What are we going to do today, Borg? Owner of Elecraft K2 #2172 |Same thing we always do, Pinkutus: | Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Gimp save for web
Hi, Save for web plug-in is getting closer to usable state (version 0.18.0 so far). (For those, who got 0.15 version please update to recent, as it had saving bug.) The plug-in now has most of the stuff that has been suggested as improvement on this mailing list. Most important is that previews update much faster and it is much more comfortable to experiment (but I am not sure if this wouldn't cause problems on slow PCs) BTW, It could be good time to discuss how far it is from vision of GIMP user top request number seven. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Multithreaded plug-in
hi, I was trying to create a multithreaded plug-in but call to gimp_image_duplicate from worker thread results in the following message and worker thread deadlocks. (webexport:4097): LibGimp-WARNING **: unexpected proc return message received (should not happen) What am I doing wrong? ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GimpImage to GdkPixbuf
On 3/23/07, Sven Neumann [EMAIL PROTECTED] wrote: What you are asking for is currently not possible. There are some ways to get something close though. It would help a lot if you could explain what exactly you want to achieve. We could then see if there are already ways to do that or if a new API is needed. The first idea was that you can render all pixels of image on GdkPixbuf once, and then it is very easy (and both fast) to display GdkPixbuf zoomed, scrolled, etc, on GdkWindow. (Eliminate complexity and add flexibility :) I know that this approach wouldn't work for very large images and it is not useful for everyone, so I thought of something more general: gboolean gimp_image_render_to_drawable( GimpImage image, GdkDrawable *drawable, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, int overall_alpha, int check_x, int check_y, int check_size, guint32 color1, guint32 color2); (most arguments mean the same as in gdk_pixbuf_composite_color()). This would render gimp image (whole or part) on GdkPixbuf or GdkWindow, which should be enough to meat any rendering needs on custom widgets. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GimpImage to GdkPixbuf
On 3/22/07, Michael Natterer [EMAIL PROTECTED] wrote: I would say making a screenshot and loading the resulting file with gdk_pixbuf_new_from_file() is probably the easiest way. I would like to implement something like GdkPixbuf gimp_image_render_gdk_pixbuf (GimpImage) or even more general void gimp_image_render_gdk_drawable (GimpImage, GdkDrawable) correctly (with display filters, color management, etc). This would probably be easier to be done in the core, though. If screenshot is an option to implement it, could you tell me how can I take screenshot of image which is, for example, too large to fit in a window? ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GimpImage to GdkPixbuf
On 3/23/07, Michael Natterer [EMAIL PROTECTED] wrote: I could imagine just another copy whatever function that does this. You could then simply paste the buffer as new image and save it. An in-core pixbuf wouldn't help you anyway, you want the pixels in a file anyway to be able to use them. We don't understand each other. I want in-memory GdkPixbuf (not files). I want to know how I could hack a function in my plugin that does this. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] GimpImage to GdkPixbuf
Hi, What's the best way to render gimp image to GdkPixbuf (which in turn can be rendered to GdkWindow)? The GdkPixbuf would contain the same pixels as if they were rendered with Gimp on GdkWindow (display filters, color management, etc). In other words, it should pre-bake this stuff. Is it possible to do that? Thanks. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] save for web plugin feedback
Hi, It seems that your friend has tried an older version. In newer version (0.8.1) there were some changes which affect plug-ins usability. It would be very nice to hear detailed comments about it from someone who would use save-for-web often. The plug-in is still missing some options, but they'll be added as soon as it is considered usable in general. Thanks ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Rewritten save-for-web
Hi, Save-for-web plug-in has been rewritten in order to make code maintainable and to introduce some features previously discussed on the mailing list. If someone tests it (last version 0.8), please tell if it is useful and comment whether it should be added as standard gimp plugin. (There is an enhancement request for save-for-web plug-in in Bugzilla, but it is possible that something diferrent is expected). link: http://registry.gimp.org/plugin?id=8799 Thanks. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] GimpZoomPreview usability
Hi, It uses GtkDrawingArea. ... I don't see why you couldn't implement cropping with one of the GimpPreview widgets. I tried to use GimpZoomPreview instead of GtkDrawingArea and want to tell you what I have found out. As I understand it, GimpZoomPreview is designed to be very efficient for previewing various filters (in terms of required processing memory). Unfortunately, it doesn't seem very usable as one might expect. For a large preview widget uses area not larger than original image dimensions, so when you zoom in you see image only in that area and large parts of widget outside image area are drawn in background color. Moreover, it becomes unacceptably slow when scrolling. The design for small previews just doesn't seem to support large previews well. Therefore, chose GtkDrawingArea. BTW, is there any way to use gimp quick navigation widget with GtkScrollingWindow or ...? In addition to this, GimpZoomPreview doesn't seem to work well with filters either. As far as I know, only nova.c (Supernova) uses it correctly, but it only renders based on a single selected point (it doesn't have to read analize pixels, it only renders on them). If I understand GimpZoomPreview correctly, a plug-in has to scale pixel data outside preview viewport itself (it would be much harder to work if source destination layers would have different dimensions). This is not a very easy task, if you don't scale the whole picture, but only required parts (for efficiency). In conclusion, either I don't understand GimpZoomPreview (in that case some explanation would help) or its API should be improved to make it more usable. Thanks. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Save As JPG Integrated (mockup)
Hi, On 2/6/07, Sven Neumann [EMAIL PROTECTED] wrote: BTW, does this plug-in use GimpPreview widgets? I would like to get some feedback on features and API of GimpPreview and its derivatives. It actually uses GtkDrawingArea. This is related to zoom cropping functionality. If we dropped cropping, one of Gimp widgets could be used. Is there any widget which supports - zoom in out - GIMP quick navigation widget in the corner of the scroll bars - access to cursor coordinates to give extra control with mouse? Thanks ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Save As JPG Integrated
Hi, On 2/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Tuesday, February 6, 2007, 20:03:59, peter sikking wrote: - that in-dialog cropping looks like a very uncomfortable way to do that to me; - simply display the Size in the fields that are now called Resize now without the open/close triangle, and remove the other size display; I actually find resize/crop controls redundant in the Save for Web dialog - I usually prepare the image beforehand while keeping it in a native (lossless) format, then just expect to use Save for Web to export the image for upload to a website without touching the original. The idea is based one of bug list's enhancment request which asks to save image for Internet, ie user wants image to be as small as possible (for example to send with mail or put to forum) and some parts could be cropped and picture could be resized until wanted file size is reached. It was then decided that this functionality should be put in save for web plug-in. (see http://bugzilla.gnome.org/show_bug.cgi?id=317100 ) Maybe we should discuss again if this functionality is needed and if so, is it convenient to integrate it into save for web plug-in. Thanks. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Save As JPG Integrated (mockup)
On 2/3/07, peter sikking [EMAIL PROTECTED] wrote: Thorsten Wilms wrote: BTW, some apps have web export dialogs with side by side panes original/compressed. I found toggling between original/preview in the same view to be superior if you want to spot JPG artifacts. It's important it can happen with a single click. Yep, well observed... Hi, I've worked on a similar plug-in. It would be very interesting to hear some comments on it as I am planning to improve it. Here is a short introduction: http://img300.imageshack.us/img300/6571/saveforwebid4.jpg Peter, could you tell if it fits in save for web scenarios and what could be changed to make it better. Thanks ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] 32bit BMP appear blank
Hi, This is a summary of Bug 352262 – 32bit bitmaps (*.bmp) appear blank ( http://bugzilla.gnome.org/show_bug.cgi?id=352262 ) which as Sven said is important to be settled before releasing 2.4 version. After bmp plug-in has been updated it, among other things, started parsing bytes which were thought to be alpha channel. When bitmap contained valid alpha data in these bytes (which can be created with PS or some other app), this feature worked as expected. However, when bitmap was saved in 32 bit format without alpha, all those bytes became 0. As the result, image appeared completely blank on the screen. The main question: should those bytes be ignored (as it is done by many applications) or should some workaround be used (in case we want to support 32bit bitmaps with alpha channel)? Unfortunately, we were unable to find any official documentation dealing with the problem. Programming Windows, 5th Edition (Charles Petzold - MS Press, 1998) tells that those bytes should be 0. In other words, they should be ignored while loading and set to 0 while saving. P.S. Results of the discussion could be useful when solving Bug 65534. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer