[Gimp-user] batch convert
If you wish to use the GIMP to perform your task, I describe how to do it in the following post on GIMPtalk. You will have to change the output extension from ".png" to ".jpg" though. Feel free to contact me if you experience any difficulty. http://www.gimptalk.com/forum/topic/Gimp-Xcf-Image-Viewer-2399-1.html#15851 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] important GIMP features for the future ?
I feel there is no better software choice for educational use than the GIMP. > *** preview options *** > preview options are needed for some important and frequently used > scripts (i.e. adding shadow) (#52374) I am by no means a GIMP guru, but the "previews for plugins" issue seems to be something of a double-edged sword. I certainly agree that showing the effects of altering parameters in the main image display is, in most cases, ideal. If I understand correctly, one of the difficulties with accomplishing this is that plugins communicate with the main GIMP program using a message-passing system ("The Wire") and interactive plugins are somewhat limited on the amount of information that can be exchanged in a responsive manner. This limitation currently has to be weighed against the benefit of permitting the entire GIMP community to safely contribute to the GIMP (using, for the most part, their programming language of choice). I can't imagine the GIMP having reached the advanced state it is in without the extensibility provided by the Procedural DataBase and plugins. > *** some other things *** > - Please implement an easy and fast way to instantly overlay a layer > with a specific color or gradient (+preview option). You can drag-n-drop a color directly from the foreground, background, or a color dialog onto a layer; you can use the "Tools->Paint Tools->Blend" to do the same with a gradient (I consider both of these to be "easy and fast"). A "preview option" would introduce a confirmation step that would make the process both more difficult and slower and, from an internal standpoint, be little different from the use of UNDO to revert an undesired change. > - Please implement a script to add inner glow. There is a "Layer Effects" plugin available in the Plugin Registry which implements this; though I would question its usage in an educational setting. If you are trying to teach a course in user interface, fine, I understand. But if the goal is to teach image manipulation and its algorithms then would it not be of more use to learn "how" to add an inner glow. All of the "layer effects" are fairly simple operations that, at their core, are just nice "packaging" of the more important concepts of color combinations, convolutions, thresholds, and opacities; all of which can be taught at their intuitive level with GIMP (without a "dumbed down" user interface confusing the user). If the suggested enhancements are taken from a "productivity" standpoint, I might better sympathize (although I *really* like the GIMP's interface); but as they were presented from an educator who wishes to use the GIMP in the classroom, I would submit that what is being taught be considered. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Does Gimp have CHOP like ImageMagick
I have written a script that will do this. If a horizontal selection is made across a layer, the script cuts out the selection and joins the top and bottom. If a vertical selection is made across the height of a layer then it joins the left and right unselected regions. The script is located at http://www.postbrickfilms.com/saulgoode/GIMP/anti-crop.scm IMPORTANT NOTE: If the selection is other than a horizontal or a vertical "strip" across the entire width or height of the layer, this script will behave in the following manner (much harder to describe than to use)... If the layer is considered to be the combination of 9 rectangular regions: 123 456 789 The horizontal strip case could be described as "456" being the selection. Performing "anti-crop" on the horizontal selection ("456") leaves 123 789 Similarly, for vertical strip selection ("258"): 13 46 79 Left half selection ("124578") leaves: 3 6 9 Central selection ("5") leaves: 13 79 Corner selection (such as "1245") leaves: 9 Center edge selection (such as "25") leaves: 79 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] wavplay audioserver
I take it you have not installed Wavplay? Here is a list of mirrors for the source I used (your distribution may have a binary available): http://www.filewatcher.com/m/wavplay-1.4.tar.gz.63549.0.0.html ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Non-background layers with no alpha
The 'duplicate layer' function in the GAP's Frames Modify dialog permits you to create a layer that does not have an alpha channel. This doesn't really create any problems, but I recall seeing in Bugzilla that this should not be possible (this was just a side comment to another issue and I was unable to locate the report). Also, I am unaware of any other way to create such an non-background alpha-less layer and wonder if this behavior should be changed to match the GIMP's Duplicate Layer functionality. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Using PDB To Transform Paths
I am trying to determine a way to transform (scale, rotate, etc) a path using PDB functions. This would be similar to the way the various Transform Tools permit the selection of the "Affect" option. At a minimum, I should like to perform a simple X-Y scaling of a path; so as an alternate solution, is it reasonable to just apply a scale factor to all of the path points to achieve this? Or does this not work with Bezier curves? Thanks. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] layers
I have written a script that somewhat eases the task of changing the "delays" and combination modes of a multi-layer animation image. A description of its usage and a link to whence it can downloaded is availble at the following forum. http://www.gimptalk.com/forum/topic/Gif-Animation-Settings-3966-1.html ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] The Lighting Effects plug-in
Have you assured that your bump map has the same width and height as your image? If I am not mistaken, this is a prerequisite for that filter. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] testing GAP with our latest GIMP author
Carol Spears wrote: > well, the book is out now and interestingly enough, the GIMP Animation > Plug-in is in need of testing before its release. I am not really sure what this means but if you are seeking volunteers to follow the instructions in the book for using the GAP then I would be willing. Although I would ask that the appropriate section(s) be e-mailed to me as I doubt that I will be purchasing it in the near future (most of the stuff which interests me is more technical and only to be had by reading the source). I am starting to gain a pretty good grasp of the GAP, due in large part to the tutorials on your site. Good luck with your filming. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] mask layer
Adly, 1) The image that contains your "mask layer" must be opened. The Move Path plugin look for files on your disk, they must be opened. 2) The "mask" image must be the same Mode as the destination. If you mask is a Grayscale image and the destination image is RGB, the GAP will not display it in the "Source image/layer" box. (The same is true for Indexed images; the Modes must be the same.) 3) Your mask should be an actual layer and not a layer mask. If you "Move Path" a layer which has a layer mask, the mask will be applied to the layer before the layer is copied and the layer mask is lost. Assuming that you have a layer mask that you wish to add this mask (not the layer it belongs to) to a sequence of frames, here is what you need to do: a) Duplicate the layer/layermask. b) Select All for the duplicate (you could apply the mask if you wish) c) Use the duplicate as your "source image" in the Move Path command and choose your "Layerstack" position (in the bottom right of the window) so that the duplicate is placed directly ABOVE the layer to which it is to be added. d) After the Move Path has completed, perform a "Frames Modify->Layer Masks->Copy Mask From Layer Above". (Since there is no mask attached to the layer above, this operation results in the layer itself being copied as a mask.) At least I think that is the best way to do it. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] mask layer
Sorry, the first criteria should have read as follows: 1) The image that contains your "mask layer" must be opened. The Move Path plugin DOES NOT look for files on your disk, they must be opened. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Select shapes
When you are cutting out shapes using the Intelligent Scissors tool, you must click on your original starting point after enterring the last point. After that, you should should click on the inside of the drawn shape and the shape will change into a selection (you may already know all of this). Once your selection is made, you will wish to invert it ("Select->Invert" from the image menu). You can then "Edit->Clear" and the region outside of your drawn shape will become transparent. NOTE: it will only become transparent if the layer has an alpha channel (otherwise it will be filled with the background color). If the layer name in the Layers window appears in BOLD type (this indicates it has no alpha channel), you can add an alpha channel by performing a "Layer->Transparency->Add Alpha Channel" from the image menu. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] How to animate a transition effect?
Joe Smith, I have written a few GAP tutorials which are in the wiki at http://www.brickfilms.com/wiki/index.php?title=GIMP_Tutorials None of them specifically address your concerns but perhaps by going through them, you will gain a better understanding of the overall process (the "Layer Masks - Clockwipe Transition" is probably the closest to your actual application and the "GIMP-GAP Overview" might prove helpful if you are an absolute beginner). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Re: Help needed with photo touch-up using Gimp 2.3.9
A simple method I often try for adjusting the exposure of photos is to duplicate the layer, desaturate and color-invert the duplicate, and then set the Layer Mode of the duplicate to Overlay (or Soft Light, depending on the image). This has the effect of lightening the dark areas and darkening the light areas. The Opacity of the duplicate layer can usually be adjusted to provide a pleasing result. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Am I stupid!? Changing color does not work
If you are indeed editing an Indexed image, you may wish to leave it in Indexed Mode and open the "Dialogs->Color Map" window. This will allow you to individually change each of the colors in the image. This will be tedious if you have more than a couple dozen colors but if you have only a few (for example, a cartoon graphic), this is a quick and easy way to change the colors. Quoting Carol Spears <[EMAIL PROTECTED]>: On Thu, Jun 15, 2006 at 02:13:34AM +0200, Norbert Preining wrote: Hi all! I have an image and I want to change all colors into a different one. So what did I do: * Select region by color * switch to pencil tool opacity 100 mode normal circle big color the new I want and then I thought I can draw and the colors would be exchanged. Well, instead of a nice blue I get a smeary grey, strange. Looks like instead of *replacing* the values of the pixels some combination of the pixel values is done. I thought with opacity 100 this will not happen, but I seem to be wrong. Any idea/help??? i think you are probably painting an indexed image. change the mode to rgb using Image/Mode/RGB you are not stupid. your image is. carol ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] save image to jpeg format in batch mode
The GIMP.ORG (http://gimp.org/tutorials/Basic_Batch) tutorial seems to be up-to-date and covers just about all that you need to know. Also, have you visited GIMPtalk.com and searched for the term "batch". That should provide some good examples that do almost exactly that which you described. If you have any specific questions, I shall be happy to try to answer them. Quoting "B.W.H. van Beest" <[EMAIL PROTECTED]>: I would like to create a jpg image from a gimp xsf-file, but in batch mode. (for instance, to have it as a rule in a Makefile) I have been struggling with this for quite some time, but all attempt have failed. Browsing the web did not yield workabale references or examples. It seems that info on script-fu all is outdated? Is there somebody around who can who me how to do this? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] save image to jpeg format in batch mode
Quoting "B.W.H. van Beest" <[EMAIL PROTECTED]>: 802] test>gimp -i -b '(file_jpeg_save RUN-NONINTERACTIVE "blurk.xcf" 2 "aap.jpg" "aap.jpg" 80.0 0.0 0)' '(gimp-quit 0)' No batch interpreter specified, using the default 'plug_in_script_fu_eval'. batch command: experienced an execution error. [803] test>What am I doing wrong? The "image" parameter in any script-fu function is actually a number which is defined when the image is loaded into the GIMP; it is *not* a filename. It is necessary for you to create a short script which loads your file into the GIMP and *then* saves back to disk. I have written just such a script for you which you can find at http://flashingtwelve.brickfilms.com/GIMP/Scripts/batch-xcf2jpg.scm The script should be executed from the command line as follows: gimp --no-interface -b '(batch-xcf2jpg "pattern.ext")' '(gimp-quit 0)' Where the string ("pattern.ext" in the example) is a wildcard pattern of all of the files which you wish to be converted; the pattern can also be just a specific filename (for example, "someimage.xcf"). The script can be used to convert other formats (PNG, GIF, etc) by changing the extension (the output is always JPEG). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Combine 2 pictures
I am surmising that the problem which you are experiencing is because you haven't adjusted your "canvas size" to accommodate both layers side-by-side. The easiest way to do this (assuming that you have two separate layers) is to move one layer completely outside of the other layer and then perform an "Image->Fit canvas to layers" command. You should then be able to see both layers in your window and can place them accordingly. After you have the layers where you wish, you should crop your image to eliminate the unwanted portions. Quoting "Thomas w. Cranston" <[EMAIL PROTECTED]>: I scanned artwork that was bigger than my scanner, by scanning the right end, and then the left end. I saved the 2 images, as a, and b. How do I do this, so that I can combine them as one image. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Editing the alpha channel
Quoting "scott s." <[EMAIL PROTECTED]>: I seem to be missing a basic concept. If I open an image with alpha channel, I can't find any way to edit the alpha channel. I end up using other software to save the alpha as a grayscale and editing that. That requires converting my 24 bit image to grayscale too so I can load the alpha as a layer for editing. What I want is to keep the 24 bit rgb image and edit the alpha as an 8 bit layer. FWIW, I generally use 32 bit targa format for editing image with alpha., because I don't have any filter for directX compressed formats (DXT1, DXT3). Perform a "Layers->Mask->Add Layer Mask" and select "Transfer layer's alpha channel" as the initialize option. You can then edit the "alpha channel" by editing the layer mask. When you wish to transfer your edited layer mask back to the alpha channel, perform a "Layers->Mask->Apply Layer Mask". ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Editing the alpha channel
Quoting "scott s." <[EMAIL PROTECTED]>: The advantage to editing the channel mask is that you can set a color for the mask, which makes it easier to see just what you are doing. When I edit the layer mask, other than modulating the transparency of the connected layer, I can't precisely see the effect. If you wish to see just the mask itself, you can use the "Layer->Mask->Show mask" command. This will show the "effect" of either painting or filtering the mask. If you wish to have a partially transparent (tinted) view of the mask (with your image behind it), you can perform a "Layer->Mask->Mask to selection" and then use Quickmask mode to edit the mask. After you are done editing the Quickmask, you can delete the layer's mask and perform an Add Layer Mask and choose "From Selection" for the Initialize option. (There may be better ways to accomplish this, and you may still prefer the channel method you are currently using.) there is one other thing: In the add layer mask there is an option Layer's alpha channel but also Transfer layer's alpha channel What is the difference? The first option copies the alpha channel to the layer mask but leaves the alpha channel intact. The second option not only copies the alpha channel to a mask, but setsthe alpha channel to WHITE as well (i.e., sets it to fully opaque). If you try the two different options on the following image, the difference should become apparent. http://flashingtwelve.brickfilms.com/GIMP/Temp/GIMP-challenge.png I suspect you will find "transferring" the alpha channel to a mask to be more useful for your purposes. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to use gimp-layer-set-opacity in batch mode?
Quoting Klaus Schmidinger <[EMAIL PROTECTED]>: "GIMP: Not enough visible layers for a merge. There must be at least two." The CVS version of the GIMP permits "merging" a single layer. If you are unable to get the CVS version, you can try the following approach which applies a 50% (GRAY) mask to the layer. --- (let* ( (image (car (gimp-file-load 1 "test.png" "test.png"))) (drawable (car (gimp-image-get-active-layer image))) (mask (car (gimp-layer-create-mask drawable ADD-WHITE-MASK (gimp-layer-add-mask drawable mask) (gimp-brightness-contrast mask -127 0) (gimp-image-remove-layer-mask image drawable MASK-APPLY) (gimp-file-save RUN-NONINTERACTIVE image drawable "test-50.png" "test-50.png") (gimp-quit 0) ) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Layer positioning via dialog
Quoting Mauro Condarelli <[EMAIL PROTECTED]>: I would be much happier if I could have some kind of feedback. E.g.: a box showing the position of the layer into the canvas. Any further idea?? The following Script-fu will allow you to enter numerical offsets into a dialog box. Script-fu is unable to provide a visual preview of the result but perhaps this will suit your needs (you can UNDO the operation if the result is unsatisfactory). Save the text below as a file named "layer-offset.scm" in your scripts directory. The command will appear as "Script-Fu->Transform->Layer Offset". (define (script-fu-layer-offset image layer offset-x offset-y resize?) (gimp-image-undo-group-start image) (gimp-layer-set-offsets layer offset-x offset-y) (if (= resize? TRUE) (gimp-image-resize-to-layers image) ) (gimp-displays-flush) (gimp-image-undo-group-end image) ) (script-fu-register "script-fu-layer-offset" "/Script-Fu/Transform/Layer offset" "Offset the layer relative to the image" "Saul Goode" "Saul Goode" "6/22/2006" "" SF-IMAGE"Image"0 SF-DRAWABLE "Drawable" 0 SF-ADJUSTMENT "Offset X" '( 1553 0 5000 1 10 0 1 ) SF-ADJUSTMENT "Offset Y" '( 1038 0 5000 1 10 0 1 ) SF-TOGGLE "Resize image?" TRUE ) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Website idea and comments on Gimp vrs photoshop
BTW, does anyone know how to make an 'inner glow' on a shape? I posted a tutorial on GIMPtalk which covers shadows and glows. It doesn't cover 'inner glows' specifically (that is left as an exercise for the user) but it might give you a nudge in the right direction. It might not even be the best approach, I was trying to come up with a methodology which was easy to describe and to remember while still being flexible. The easiest solution to shadows and glows is probably Iicci's "Layer Effects" plug-in but I wanted some visual feedback of what I was doing (as opposed to just enterring numbers). Like most of the tutorials (and scripts) that I've written, since writing it I have learned so much that I feel I should rewrite it incorporating what I have learned. Tutorial link: http://www.gimptalk.com/forum/topic/Shadows-And-Glows-3-d-Effects-4624-1.html ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Website idea and comments on Gimp vrs photoshop
Quoting Joey Marshall <[EMAIL PROTECTED]>: Thanks, but for an outer glow, I much preffer to use the scriptfu shadow; Make the color white and change the x and y offset to 0. This works very will for me and it is quick :) On 6/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: BTW, does anyone know how to make an 'inner glow' on a shape? I posted a tutorial on GIMPtalk which covers shadows and glows. Ahh, I thought you wished to learn *how* to make an inner glow whereas what you really wanted to know is how to select options on a particular user interface ;-). Personally, I hope GIMP doesn't ever become the "GNU Dialog Box Manipulation Program". ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] How to do Angled Gradient Fills
A, I am not sure if the following produces the effect you desire, but it should be easy enough to test it out. * Activate the QuickMask and stroke your path with a WHITE pen. * Deactivate QuickMask. * Use the Blend tool to fill the selection with the appropriate gradient. You will probably wish to set the Shape to "Shaped (angular)". ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] script-fu - ERROR: bad function
I think that there exists a problem with the construct of your IF statement. The format of IF statements in Scheme is: (if condition do_this_if_true do_this_if_false ) For example: (if (< x 0) (print "X is negative") (print "X is positive") ) The "do_this_if_false" is optional but if you wish to do more than one thing, you must use a "(begin" ... ")" statement. (if (< x 0) (begin (print "X is negative") (set! sign -1) ) (begin (print "X is positive") (set! sign 1) ) ) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] script-fu question
Kevin Cozens provides a script written in Perl which will convert older script-fus to work with the newer API (http://www.interlog.com/~kcozens/software/gimp/2.0/script-update.pl). Even if you do not have Perl on your machine, you should be able to use the information in the script to determine the necessary modifications. Quoting Sven Görsmann <[EMAIL PROTECTED]>: My question: Do you know any "manuals" or links that could help me in converting the old scripts to work again, for example a list which shows the old function on the left an the new on the right.or something like a how-to ? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Question about scripting
I am not following your use of "immutable" (it seems to contradict the statements in parentheses). Perhaps you could clarify that part. Also, I would caution that in GIMP parlance, the term "resize" generally refers to changing the canvas size of the image (without affecting the pixel data in any way). The term "scaling" is used to describe actually changing the size of image contents. Miscommunication could arise if this convention is not recognized. I am not aware of a Procedural DataBase function that permits automatic saving of curves or levels. There is support (via some GAP plugins) for the loading and application of such files. The files themselves are simple affairs and there should be little difficulty in writing functions to save them. (Also, the curves and levels can be saved from their corresponding "Layers->Colors..." dialog boxes.) I am not familiar with Python-fu but all that you described is easily handled by Script-fu and there is little reason to doubt that it cannot be accomplished with Python. The PDB is language agnostic and I think it is fair to say that Script-fu is the least capable of the available scripting languages. Quoting Kent Tenney <[EMAIL PROTECTED]>: Is it possible to script this capability? (automatically saving the curves and levels files, under names which indicates which image they are associated with) Could it be scripted with Python-fu? (I am comfortable with Python, not scheme) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] how to copy mask to layers
Quoting Thadeu Penna <[EMAIL PROTECTED]>: I have a mask in one layer that I would like to copy to all others. Is it possible in Gimp, besides going one-to-one ? This would be very easy to script. In fact, I whipped up a Script-fu that might meet you needs and it is available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/copy-mask.scm What the script does is copy the layer mask of the active layer to all visible layers (unless they already have a layer mask or they do not have an alpha channel). If the active layer does not have a layer mask then the script will use a grayscale copy of the layer (if the active layer is visible then it also will have a mask added). There is very little error checking and the script will fail if any of the visible layers are not the same size as the active layer. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] n00b question about resizing
Quoting Rick Hogg <[EMAIL PROTECTED]>: Now, to do this I went into the Image->Scale Image dialog, changed X- and Y- Resolution to 72 pixels/inch, but the Image Size didn't change. The link box to the right of each of these options was linked. If I didn't know the image was supposed to be 250x160, is there any way to automate this process? What is the equivalent of the two PS options? I am not that familiar with the Photoshop paradigm but perhaps Adobe chose to combine into one what the GIMP maintains as separate operations. If you use the GIMP's "Image->Print size...", you can change the DPI setting so that it matches the setting of the intended output device. You would then use "scale image" to size your image to what it what its real-world dimensions should be on that device. Hopefully, I am not too far off-track on either what you are seeking. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] howto obtain level information
The PDB function "gimp-histogram" is that which you seek. Quoting Jan Wuerthner <[EMAIL PROTECTED]>: Anyway, I have seen there is a function "gimp_levels" I can use to set the values. Now I need something like "gimp_get_levels" to determine the values I want to set. I haven't found anything to get the levels information from a drawable. Can anyone help me? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] How to chosing motion blur point+how to add blur angle
bramburger wrote Is there a possibility to point out the blur point in the image with a mouseclick? Or do you have to do it with the X&Y things? I have been known to "cheat" using the following method: Duplicate your layer then clear the duplicate (it should be transparent). Using the Transform Scale Tool, resize the transparent layer so that the "circle" handle is situated over the focal point of your blur. Perform a Merge Down (you now have a layer such that your focal point is at the center). Perform your Motion Blur. Perform a "Layer to Image Size". The last step assumes that your original layer is the same size as your image. If this is not the case then it requires a couple of extra steps to crop your final layer to the correct size. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to chosing motion blur point+how to add blur angle
bramburger wrote Is there a possibility to point out the blur point in the image with a mouseclick? Or do you have to do it with the X&Y things? I have been known to "cheat" using the following method: Duplicate your layer then clear the duplicate (it should be transparent). Using the Transform Scale Tool, resize the transparent layer so that the "circle" handle is situated over the focal point of your blur. Perform a Merge Down (you now have a layer such that your focal point is at the center). Perform your Motion Blur. Perform a "Layer to Image Size". The last step assumes that your original layer is the same size as your image. If this is not the case then it requires a couple of extra steps to crop your final layer to the correct size. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] GIMP Batch Mode: nothing happens!
The 'gimp-image-convert-indexed' command does not take the run mode as an argument. Try deleting the RUN-NONINTERACTIVE from the call. I would also recommend that you perform a 'gimp-image-flatten' before converting to INDEXED mode; this will help to eliminate aliasing artifacts. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Probably simple, need to know right approach
Quoting Simon Roberts <[EMAIL PROTECTED]>: I'm trying to put a bunch of photographs together as a collage. As I do so, I want to be able to resize and reposition each one repeatedly until I'm happy with the overall layout. So far what I'm doing is pasting each image into a new layer, however, this isn't very satisfactory because the layers are all the full size of the image, so when I resize them, I can't really see what the effect will be on the image itself. It sounds as though you are creating a New Layer *then* pasting your photograph into it. If so, this is counter-productive. If the photographs are files on your harddrive, just create a New Image from the Toolbox File menu and from the Image's File menu do an "Open As Layer" to open the rest of the photographs 'all-at-once' (hold down the CTRL key as you click on each of the files in the Open Dialog). The photographs will be added to the image, each on a separate layer. You will most likely wish to perform an "Image->Fit canvas to layers" afterwards so that no layers extend beyond the image boundaries. If I understand you correctly what you desire to do is not much different from what I did when I created the following iTunes spoof. http://www.postbrickfilms.com/saulgoode/Images/ForumPosts/iGallery.jpg Each of the images was on a separate layer (as well as the text; I had over 80 layers) and had to be resized and cropped to fitted the page in the proper location. The GIMP made this process very easy (it only took me about an hour). Since most of the images came from the Internet, I just used drag-n-drop to put them on new layers in the image. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Animated GIFs
Quoting John Meyer <[EMAIL PROTECTED]>: BTW, I stumbled across a problem on how to dial down the speed of an animated GIF. How do you do this using Gimp (Windows)? In order to change the speed of a GIF, you must change the delays that are specified in the GIF's layernames. I have written a short script which will do this for you. http://flashingtwelve.brickfilms.com/GIMP/Scripts/anim-settings.scm The script allows you to change the delay and mode settings for multilayer animations (usually GIFs). It works by renaming the layers with the appropriate values: for example, "Layer 1 (100 ms) (replace)". It only changes the names of layers that are not hidden so that you can choose which layers you want set. You can choose to set the Mode to "(combine)", "(replace)", keep the previous value, or clear the Mode part of the layername. By the same token, you can specify the Delay (using a positive number of milliseconds), keep the existing Delay part (set the Delay to "0"), or clear the Delay part of the layername (set the Delay to "-1"). The command will appear in the menus as "Filters->Animation->Settings..." ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] how to preserve semi-transparency when converting to indexed
Since I installed a new version, the semi-transparency is cut off and I have just plain black on transparent background as if there were no antialiasing, very ugly. I wrote a script a while back that attempted to address this (available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/de-alias.scm). It works by replacing the non-transparent portion of each layer with the result of merging the layer with the layers below (actually the "projection" of the layers below it). The image at http://flashingtwelve.brickfilms.com/GIMP/Temp/de-alias.png might help explain the result. An opaque background is expected and that gets "hard-coded" into all non-transparent portions of the GIF. Fully transparent regions remain transparent (but I doubt if this fact would be of much use other than keeping filesize down). I got it working only to the extent that I needed it, so there may be some bugs in it of which I am unaware. If you let me know whether the script needs modification, I might revisit it. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-fu help?
Quoting William Fishburne <[EMAIL PROTECTED]>: I'm processing text images for Project Gutenberg (www.gutenberg.net) and I'd like to have a script-fu script that would take a list of files (preferably a file glob) and do the following: * read in the file (a png file that is RGB) * Desaturate HSV * Merge the layers of the desaturated image * Save the file to a new directory, but with the same name Download the script from http://flashingtwelve.brickfilms.com/GIMP/Scripts/batch-grayscale.scm and place it in your "~/.gimp-2.2/scripts/" directory (or other appropriate location). You should then be able to call the function from a shell using a command similar to the following: gimp --no-data --no-interface -b '(batch-grayscale-image "filename1.png /home/saul/images/*.png books/covers/Twain*.png" "/home/saul/GrayscaleVersions/" 0)' '(gimp-quit 0)' The first parameter to the function 'batch-grayscale-image' is a file-glob string and can be a list of discrete filenames, a wildcard expression, or a combination of both. The second parameter is a directory name string (it does not matter if the trailing slash is present or not) and this directory must already exist. The third and final parameter is the "method" to be employed to effect the conversion. It is a number ("0", "1", or "2") and has the following meaning: 0 = Value: the same result as the "Value" channel of an HSV decompose 1 = Channel mixer: the same result as changing the image mode to Grayscale 2 = Desaturate:the same result as performing a desaturate on the layer For what it's worth, the script is not limited to PNG files; but if other types are used, only the top layer is converted to grayscale, no merging of multiple layers takes place, and the output file is of the same type. If you encounter any difficulties or require further customization of the script, feel free to let me know and I will be more than happy to do what I can to assist (I am a great fan of Project Gutenberg). Hopefully, you are not using Windows as I have experienced some difficulty with Windows using my scripts from the command line (mostly due to their peculiar employment of the backslash). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] how to preserve semi-transparency when converting to indexed
Quoting j_mach_wust j_mach_wust <[EMAIL PROTECTED]>: saulgoode wrote: It works by replacing the non-transparent portion of each layer with the result of merging the layer with the layers below (actually the "projection" of the layers below it). That sounds as if it's still impossible to preserve semi-transparency while converting to indexed in the GIMP. It is impossible to preserve semi-transparency for GIF files in general; the format does not permit it. The GIF file specification permits ONE color to be treated as a "skip this pixel entirely", there is no allowance for any partially transparent pixels. This has nothing to do with the GIMP, it is a limitation of the file format. Matthias Julius wrote: How much does this reduce the file size? I don't remember exactly, but I thought I tried it and it significantly reduced the file size, so therefore I kept doing it. I'm confused now. The PNG file format specification permits a similar indexed encoding scheme as the GIF format; thus a PNG file should, at a minimum, be able to replicate the GIF file's compression ratio. Some image programs (Photoshop, for example) *used to* inefficiently convert indexed images to 24-bit RGB PNGs which resulted in dramatic increases in file size. This was done at a time when those programs did not fully support the PNG specification, I very much doubt that any software suffers from this lapse anymore (well, maybe some of Microsoft's offerings). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] how to preserve semi-transparency when converting to indexed
Quoting j_mach_wust j_mach_wust <[EMAIL PROTECTED]>: saulgoode wrote: The PNG file format specification permits a similar indexed encoding scheme as the GIF format; Unlike an indexed GIF, an indexed PNG allows semi-transparency. I thought I was able to produce such semi-transparent indexed PNG with GIMP. I don't know how I did it. It appears that former versions of GIMP were not able to produce semi-transparent indexed files at all (to be saved as PNG). My question is: Is it now possible to have semi-transparent indexed files (I thought it were as I can remember I did it)? If it is possible, then how to do it? I misunderstood what you were asking before, sorry. My understanding of the PNG indexed format is each color of the palette can have a different transparency level assigned to it. If this is true, there should be a way to duplicate the colors of your palette with varying levels of opacity. For a B&W palette, you could have 128 levels of opacity for each, for a 4-color palette, 64 levels, etc. I am unaware of the GIMP possessing such a capability but that is not to say it doesn't exist. :) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Fuzzy border in a script
Quoting houghi <[EMAIL PROTECTED]>: I would like to use 'Fuzzy border' in a script yet I can not seem to get it right. All I get is "batch command: experienced an execution error." I have searched for aboyt two days and dit not find a solution. I would be needing to rn it in a batch script, because it will be done on 2000+ pictures. My (wild) guess is that you are passing filenames from the command line to the GIMP, thinking that 'fuzzyborder' script can accept them for its "image" parameter. For example, if you are doing something like: gimp -b '(fuzzy-border RUN-NONINTERACTIVE "*.png" 0 \'(0 0 0) 20 5 1 0 0 0 1)' '(quit 0)' this will not work becasue 'fuzzy-border' expects a number for the IMAGE parameter and does not know how to handle the string "*.png". You usually have to define a new Script-fu function which takes care of opening the file and calling 'fuzzy-border' with the image identification number of the opened file. If there is a better place to ask, please let me know. Personally, I find forums to be easier than mailing lists to ask for and to receive help for a problem such as this. If I have guessed wrong on your problem (there are many things that can cause an "execution error"), you could post your problem on http://www.gimptalk.com/forum or http://gug.sunsite.dk/forum/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] rounded corners on jpg image.
Quoting "John R. Culleton" <[EMAIL PROTECTED]>: have a jpg image that is in rectangular form. I would like to round the corners off symmetrically to soften the shape a bit. Which is the quickest way to to this? The quickest way is to: * Select all * Perform a "Rounded rectangle" (I think you will find this on the "Select" menu, but on previous GIMP versions it may be under "Script-fu->Selection") * Invert the selection * Fill with a background color (JPEGs do not support transparent areas, therefore you have to choose a specific color for the corners) If you would prefer to have the corners match the background of whereever the image is to appear (on a webpage, for example), you will have to use the PNG format (GIFs will work, too; but will have "ugly" edges). Change the last step above to: * Perform a "Layer->Transparency->Add alpha channel" and then an "Edit->Clear" If you *have* to use JPEG format, I would recommend that you place a border around your image: * Select all * Perform a "Rounded rectangle" (I think you will find this on the "Select" menu, but on previous GIMP versions it may be under "Script-fu->Selection") * Create a new transparent layer. Increase this layer's boundary size by the amount of border you think will look good. Use the "Center" option when resizing the layer * Perform an "Image->Fit canvas to layers" * Invert the selection * Fill with a border color ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Layers tree-view (or grouping layers)
Quoting mfi3 <[EMAIL PROTECTED]>: Thanks for all replies - main reason why I need tree view (and grouping) of layers is cleaning up of layers window - and it would be hard to accomplish in other way than grouping layers and displaying them in a tree view. So I will wait, hoping that some day gimp developers will work on http://bugzilla.gnome.org/show_bug.cgi?id=86337 I have written a Script-fu which implements layer groups but it is intended mainly as a test-bed for determining how they might someday be implemented. It is actually quite functional but the user interface is definitely lacking. If you would like to give it a try, I have a version which might provide the functionality you desire (my other versions consist mainly of replacements for the various buttons and menu functions so I might determine how they might take into account to the presence groups). The script allows you to collapse and restore the groups in the image but you cannot edit a "collapsed" group; when a group is collapsed, it is replaced by a "preview layer" in the layer stack and any changes to the preview layer will be undone when the group is restored (however, it can be relocated in the layerstack). Only one level of grouping is currently supported. The approach I am using should easily support a hierarchical nesting (the infrastructure of this version is close to doing so); however, I am not even close to resolving the user interface issues with regards to this and, to be honest, I am not sure doing so would be worth the complications. The most important caveat on using the script is that you MUST restore any collapsed groups before saving; not doing so means the "preview layer" is what gets saved to your file and, upon quiting the GIMP, the separate layers of the group are lost. You will also have to be careful about deleting a fundament; after doing so, you should perform a "Script-fu->Layer Groups->Update display" so that its adjuvants are ungrouped. I would prefer it not be distributed beyond your own use as I intend neither to "maintain" it nor to "defend" its implementation. It is a far cry from what "layer groups" should be and it is, in the fullest sense of the phrase, a work-in-progress. If your are interested in pursuing this, the script (and a very short document) is available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/Alpha ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] script-fu: copy + paste
The thing that I notice in your script is that the new layer you create has its transparency set to "0". Other than that, the paste is being performed, it is just not visible in the output. > > Hi, > I tried to set up my first script. I wanted to modify the old-photo script > in such a way to make the border fade out into transparency instead of a > color. I failed. Below is the simplified script, which should only make a > transparent border, but it does not work. My idea was to > 1 - make a feathered selection in the original image, copy this selection > 2 - create a new transparent layer > 3 - paste the previous selection into it > 4 - finally remove (or make invisible) the bottom layer > If I use the script below (where the creation of the transparent layer and > the following steps are commented out), and then I create the new > transparent layer manyally in the gui of gimp, then Ctrl+V indeed works > well: it makes a paste of the feathered selection. > However, if I uncomment even only the first 2 commented lines (which > create a new transparent layer and adds it to the image), then Ctrl+V > does not paste anything anymore; just a blank selection. Pasting from the > script (following lines in the script) also do not paste anything. > Could anybody please explain me why, and how to overcome this? > Thank you > Daniel > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Script-fu : merge and save to PNG
When you perform a 'gimp-image-merge-visible-layers', a new layer is created and its ID returned by the function. You need to pass that new layer's ID to 'gimp-png-save' ("ombre1" no longer exists). > I got my script-fu script working, and producing the image I need. Here > it is : > http://www.europephoto.com/info/titres_genealogie.scm > However, I can't save the image when it's merged. It works if I don't > merge the layers, but as soon as they're merged, there's an error. -- ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Scrip-fu documentation
Wilbur's Wiki links to this tutorial: http://pingus.seul.org/~grumbel/gimp/script-fu/script-fu-tut.html which provides a good introduction to Script-fu and also addresses the available "SF-..." widget registrations. I believe Sven has already addressed your input parameter problem in a different thread. > Is there somewhere some documentation about script-fu? I mean, for the > moment, all I found was 3 very small tutorials, some scheme > documentation, and the gimp functions in the console window. > I really find it difficult to learn script-fu because there's not much > documentation. For example, I need to understand what are the parameters > to use with SF-ADJUSTMENT. I also need to understand why I can't use the > variables I fill in when calling my script... -- ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to find out path length?
If you are using Script-fu and your script is for versions 2.2.x of the GIMP then the following function will return the length of a given path. It will work with version 2.3 but will generate some deprecation warnings (and 2.3 provides better methods). ;; 'sflib-path-get-length' returns the length of the specified path ;; ;; NOTE: If the end of the path is a X=0, Y=0 (and the slope ;; is zero there) then the value returned will be ;; slightly shorter (as much as 1.4) than actual. ;; (The path may *start* at 0,0) (define (sflib-path-get-length image pathname) (let* ( (path (gimp-path-get-points image pathname)) (last-index (* 9 (- (trunc (/ (+ (caddr path) 3) 9)) 1))) (points (cadr (cddr path))) (point-guess) (point-lo (list (aref points 0) (aref points 1))) (point-hi (list (aref points last-index) (aref points (+ last-index 1 (guess (sqrt (+ (* (- (car point-hi) (car point-lo)) (- (car point-hi) (car point-lo))) (* (- (cadr point-hi) (cadr point-lo)) (- (cadr point-hi) (cadr point-lo) ) (guess-lo 0) (guess-hi (* guess 2)) (Done FALSE) (pnt (gimp-path-get-point-at-dist image guess-hi)) ) (while (not (and (= (car pnt) 0) (= (cadr pnt) 0) (= (caddr pnt) 0))) (set! guess-hi (* guess-hi 2)) (set! pnt (gimp-path-get-point-at-dist image guess-hi)) ) (while (= Done FALSE) (set! point-guess (gimp-path-get-point-at-dist image guess)) (if (and (= (car point-guess) 0) (= (cadr point-guess) 0) (= (caddr point-guess) 0)) (begin (set! point-hi point-guess) (set! guess-hi guess) (set! guess (/ (+ guess guess-lo) 2)) ) (if (or (and (= (car point-guess) (car point-lo)) (= (cadr point-guess) (cadr point-lo)) ) (and (= (car point-guess) (car point-hi)) (= (cadr point-guess) (cadr point-hi)) )) (set! Done TRUE) (begin (set! point-lo point-guess) (set! guess-lo guess) (set! guess (/ (+ guess guess-hi) 2)) ) ) ) ) guess ) ) -- Paolo Herms Sun, 24 Sep 2006 07:52:03 -0700 > Hello, > I've got a cartographic image and I designed a path on it. > Is there any way to find out its length? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard short cuts?
Quoting Dave M G <[EMAIL PROTECTED]>: > GIMP Users, > > Because of the nature of my work, I have to repeat the same set of > commands over and over again. (...SNIP...) > Is there a way I can save a custom sequence of processes, and then, dare > I hope, bind that sequence to a keyboard shortcut? I had a few minutes free so I whipped up a script-fu which I think will do the task you described. I have even commented it so that you might see how it works (and perhaps modify it). I haven't tested the script on GIMP 2.2 (I am using a development version) so let me know if it doesn't work. The command is not assigned to a keystroke but you can do so from the "File->Preferences->Interface->Configure keyboard shortcuts->Plugins" where you should click on the "Fill Path With FG" command and then hit the key you wish assigned. NOTE: If you perform an UNDO after executing the command, you will no longer see the path because you won't be in "edit mode"; the path is still there but you will have to manually switch back to edit mode. The script is available at: http://www.flashingtwelve.brickfilms.com/GIMP/Scripts/Temp/fill-path.scm ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Quoting Dave M G <[EMAIL PROTECTED]>: > The script looks quite complicated to me, but I will endeavor to use it > as a model for building some other action sequences similar to this. > Hopefully by changing just one or two things at a time I can get a feel > for this and create more interesting scripts down the road. The script appears complicated because it handles differences in the PDB interface between version 2.2 and the development version (perhaps my comments obfuscated the code as well). If the script only supported versions <= 2.2, it would be about as simple as a script can be -- perhaps showing such code would make it more clear (I left out the PDB registration function): (define (script-fu-path-fill-aliased image layer) (let* ((path (car (gimp-path-get-current image (gimp-image-undo-group-start image) (gimp-path-to-selection image path CHANNEL-OP-REPLACE FALSE FALSE 0 0) (gimp-edit-bucket-fill layer FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) (gimp-selection-none image) (gimp-path-delete image path) (gimp-displays-flush) (gimp-image-undo-group-end image) ) ) Personally, I would recommend removing the line that deletes the path -- paths take up very little memory and you may wish to go back and edit them later. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Automated sequence of actions with keyboard shortcuts? [SOLVED]
Quoting Sven Neumann <[EMAIL PROTECTED]>: > You can write scripts for 2.2 now and continue to use them with future > GIMP versions. The plug-in and scripting API is backwards compatible. I > wonder why the example script even goes through the hassle of trying to > deal with versions. A valid point. I just dislike deprecation warnings popping up and I was rushing things a bit. Quoting David Gowers <[EMAIL PROTECTED]>: > The script as defined above produces an antialiased fill, which is naturally > the opposite of aliased (aliasing is stairstepping, and antialiasing > counteracts it.). If an aliased (ie. hard-edged) rendering were preferable, > (gimp-selection-sharpen image) would be needed before bucket filling. 'gimp-selection-sharpen' is unnecessary because anti-aliasing was disabled (the argument set to FALSE) in the 'gimp-path-to-selection' call. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] image resolution
Quoting David Heino <[EMAIL PROTECTED]>: > There's much talk recently about HDR images. Could someone with more > technical expertise than I possess comment on HighDef television and whether > there will be soon something like a HighDef computer monitor? Specifically, > for a long time I have been making images for web content at 72 dpi under > the assumption that it is the highest resolution needed for display on the > computer screen. Will this soon change? And, if so, what sort of resolutions > will be needed? How will this change the production of images for web > content? HDR imaging and HDTV are quite unrelated. The "high definition" in HDR is in reference to the color depth of the individual pixels while for HDTV it is referring to the pixel density of the image. The GIMP currently supports up to 8-bits per color per pixel 'color depth' while HDR imaging generally requires 10 or more (usually the jump is made to 16- or 32-bit color depths; and the use of floating point representation in some formats). Computer monitors and HDTV only requires 8-bit colors and so the images that the GIMP produces are quite satisfifactory for that purpose (and the "pixel density" aspect of HDTV is basically irrelevant). The need for greater color depths arises when _editing_ the images. Many cameras and scanning devices provide data that employs deeper color depths and the GIMP is currently unable to handle that extra information; it would be discarded when the data is imported from the device (or HDR file). Note that this information would also be "discarded" when sent to the monitor or HDTV (which only handles 8BPP depth) but it is useful during editing to have that information. The situation is very similar to that of audio editing and production: even though the sound quality of CDs is limited to 16-bit samples sampled at 41100Hz, it is beneficial to handle higher quality versions (24-bit at 96kHz, for example) during the editing process. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Repeating layer control over many layers.
Quoting Robin Laing <[EMAIL PROTECTED]>: > I am using GIMP to process some videos as it allows an easy way to > measure pixels and ratios. The problem is there are times when I have > to process the image using tools like Layer > Colours > Curves as one > example. > > Now the issue is how do I repeat this move over all the layers or over a > select range of layers automatically? Do I have to write a script to do > this or is there a built in tool? The number of layers to be processed > can go up to 1000 so doing it manually can be a real pain. I would recommend that you install the GIMP Animation Package (if you haven't already done so). This will add commands (under a new "Video" menu) which will permit you to what you describe plus much more. One of the commands added is "Filter All Layers" but this has the disadvantage of not being able to choose a subset of layers to filter. I would recommend doing the following: 1) Choose a representative layer of your "video", open up the 'Curves' dialog, and adjust the settings to taste. Save your settings to a file and then CANCEL out of the dialog. I would recommend saving your settings in your home directory , for reasons I will specify later. 2) Perform a "Split Image to Frames". This will convert you multilayer image into separate images of one layer (you should be in RGB Mode and have Unoptimized your multi-layer image) 3) Perform a "Frames Modify" and select "Apply Filter On Layers" using the Function drop-down widget. (If necessary, change the "From frame" and "To frame" range.) Press OK. 4) A new dialog will appear which will let you choose your filter. You should select a function called "plugin-wr-curves", found near the bottom of the list. Click on the "Apply Constant". 5) A file dialog will appear in which you should enter the filename of your saved settings. This dialog does not show hidden directories (which is why I recommended saving your file in ~). 6) You will be presented with a preview and prompted whether to continue before the operation continues. 7) If necessary, use "Frames to Image" to convert the separate images back to a multi-layered image. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Unable to use 'system' command for script-fu
Quoting Tony Freeman <[EMAIL PROTECTED]>: > Hello, > > I wonder if someone could help me with this problem I'm having using the > 'system' command in a scheme file. Unfortunately, the 'system' command is one of those rare SIOD functions that is not implemented in Script-fu. You may need to write a plug-in or a Python script to execute command line calls. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Unable to use 'system' command for script-fu <-- Almost done
Quoting Tony Freeman: > One last thing that I cannot figure out is: how do you close the > dialog box that the image is sitting in? In Scheme you do it like so: > (gimp-display-delete Image) > I've tried the following (with variations), but it causes the > python-fu to hang: > pdb.gimp_display_delete(img) To the best of my knowledge, it is impossible for a script to close the display unless it was created through PDB calls (i.e., you cannot delete an image created or opened by the user). The PDB function, 'gimp-image-delete', only works with images that have been created through the PDB. Since the call to 'gimp-display-delete' will attempt to delete the image if the display you are deleting is the only one associated with the image, you end up effectively violating the conditions of 'gimp-image-delete'. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] using a mask to help blend exposures
Quoting Joshua Simons <[EMAIL PROTECTED]>: > I am trying to blend two exposures using the 2nd technique ("Layer > Mask") > described at this URL: > > http://www.luminous-landscape.com/tutorials/digital-blending.shtml > > To use this given two exposures, E1 and E2, I need to find a way to > use E1 > as a layer mask for E2. Is that possible using GIMP? The quickest way that I know of is to drag the thumbnail of E1 from the Layers window to the Channels window. Then you click on the square, red button ("Replace the selection with this channel"), go back and activate layer E2, and perform an "Add Layermask" initializing the layermask to "Selection". I have written a Script-fu which will create a selection from the current drawable which simplifies the above process a little: * Perform Select->None. (because the script honors the selection) * Perform "Select->From Drawable" on E1. (this command is added to the Select Menu when you install the script) * Perform an "Add Layermask" on E2; initializing the layermask to the "Selection". The script is available at http://www.flashingtwelve.brickfilms.com/GIMP/Scripts/layer-select.scm if you choose to use it. There are two other commands added: "Select->Layer Bounds" (which just makes a rectangular selection the same dimensions as the layer) and "Select->To Layer" (which creates a new layer from the selection using the FG and BG colors). ___ Gimp-user mailing list [EMAIL PROTECTED] https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Is there a simple way of repeating a perspective transformation?
Quoting Neil Woolford <[EMAIL PROTECTED]>: > I have a series of images of objects, shot from the same viewpoint, which all > need to have the same perspective transformation applied before they are > retouched and used. > > Is there any simple way of exactly repeating a transformation on a series of > images. It appears that the perspective transformation is the one that you > can't even enter parameters for, it is all driven interactively by the mouse. > This will lead to differences between the images that may make some of the > retouching more difficult than it needs to be. If your images are all named sequentially ("picture_0001.jpg", "picture_0002.jpg", etc), or if you can rename them as such, then you can use the GAP to perform the perspective transform. 1) Open the first image ("picture_0001.jpg"). 2) Create a new image that will be large enough to hold the transformed image. 3) Use "Video->Duplicate Frames..." to create enough copies to hold your original images (e.g., if you have 100 originals then duplicate the new image 99 times). 4) Perform a "Video->Move Path" 4a) Set the Source Image/Layer: to the first image in your series. 4b) Set the Stepmode: to "Frame Once". 4c) Set the Handle: to "Center". 4d) Set the X: and Y: of the Current Point to be the center of the image. 4e) Check the "Instant Apply" option. 4f) Click on the Perspective tab and enter appropriate values to move the four corners of the original to the proper perspective. 4g) Click OK. At this point, a new layer will be added to each of the frames that you originally created. You can continue editing from this point (recommended) or use the "Video->Frames convert..." command to save them all as JPEGs. Step "4f)" will require some trial and error. The value of each of the points corresponds to the ratio of that point between its original location and the center. A screenshot of an example dialog is available at http://www.imageox.com/image/42041-Perspectiv.jpeg ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Path tool not working
Quoting Andrew <[EMAIL PROTECTED]>: > If I use the path tool, it is not working. even if I start gimp from > scratch, and make a new area, it is still shown with the no entry sign!?!?! > ... > Occasionally, strangely, with nothing I have done apparently having any > effect, the path tool is working. > It sounds as though your Paths Tool is in "Edit" mode. Double-click on the tool to raise its Options window and assure that you are in "Design" mode. You may also find it helpful to have the Paths dialog displayed ("Dialogs->Paths") so that you can see the various paths you are creating, select previously created paths, and change the visibility of the paths on your drawing. > Then, when I use the path tool, the from path and to path are greyed out > in the selection pull down menu. This means that you have not created a path yet (probably because you were in "Edit" mode). > if I use the intelligent scissors, I can outline an area, but I can't do > anything with it. > > Now I come back to the app, start everything again, and the path tool is > not working again. > > I use the intelligent scissors. I can make a shape. Once again, the from > path and to path are greyed out!?!?!? The Intelligent Scissors tool is completely unrelated to paths but even still, once you have outlined your shape with the scissors, you must convert it to a selection (by clicking on the starting point) before it is of any use. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] cartoon (card figure) from photo
I would suggest keeping the two operations -- outlining and color smoothing -- as separate operations. If you duplicate your layer and, on the top layer perform your edge detection, followed by a desaturation and color removal, you will be able to erase (or enhance, or de-emphasize) the outline as you desire. On the lower layer, try the Selective Gaussian Blur to smooth out the colored regions. Using the above technique (crudely), I was able to produce the following transformation: http://www.imageox.com/image/46549-bush.png Quoting Daniel Nogradi <[EMAIL PROTECTED]>: > What I would like to do is take a photo of someone's face and turn it > into a cartoon, more precisely into figures that are on ordinary > playing cards: Jack, Queen and King. The main feature of these figures > are: clear sharp edges and uniform colors between edges. This last > thing is the one that I'm not able to create from the photo. I tried > all kinds of edge detecting algorithms but the end result was always > 'photo-like' in the sense that the colors were not uniform but all > kinds of pixels next to each other as is always the case with photos. > > Would it be possible to detect sharp edges with uniform colors between them? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] cartoon (card figure) from photo
I should add that the Greycstoration Plug-in will also work wonders in cartoonifying an image. http://www.greyc.ensicaen.fr/~dtschump/greycstoration/index.html ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] cartoon (card figure) from photo
Quoting Daniel Nogradi <[EMAIL PROTECTED]>: > I guess I know too little about the terminology here; how do I > desaturate the image? http://docs.gimp.org/en/gimp-layer-desaturate.html > And what do you mean by color removal? The top > layer should have transparent background, shouldn't it? http://docs.gimp.org/en/plug-in-colortoalpha.html > I guess what I'm asking is what did you exactly do when you got your > example done? Other than edge detection (http://docs.gimp.org/en/plug-in-dog.html), some erasing of "ugly" parts of the top layer, and using the Selective Gaussian Blur (http://docs.gimp.org/en/plug-in-selective-blur.html), those parts of the GIMP User's Manual pretty well cover it. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Filter / Nature doesnt work above a certain resolution
I will take a wild guess that when working with your larger image, you have the filter's camera settings "zoomed out" enough that the result is not visible (this would explain the quick execution of the filter). If adjusting your camera settings does not solve your problem, perhaps you could provide further details about the steps you are taking (image dimensions, filter settings, etc). Quoting [EMAIL PROTECTED]: > Dear Gimp Mailinglist, > > just installed Gimp some days ago when reading a nice article on the > gentoo wiki about how i can easily create nice desktop backgrounds. > > Worked fine, i did some nice backgrounds using different filters etc. > Now i wanted to create a much more bigger image to get in on a nice poster. > > When i apply the nature/flame filter, it takes gimp only seconds to > finish, but when it does, i dont see any flame... > I'll try the same steps which a much more smaller image again, and > it works, gimp takes way longer to get finished and the flame is > there. > > Strange thing is i dont get any error messages, it just doesnt work, > and the status bar which indicates the "% done" of the current job > is starting at ~50%. > > Seems it does have something todo with the size of the image - but i > got 2 GB Ram, and have set the maximum tile size to 1gb. > > Any Ideas what i might be doing wrong or where i i have to set some > special config options? > > Regards, Moritz > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How do I restrict GIMP's palette to 16 - 235?
Quoting DJ <[EMAIL PROTECTED]>: > I am creating a menu for a DVD. How do I restrict GIMP's palette to > 16 - 235, as mentioned in the reference at the link below? > > [ref: http://people.csail.mit.edu/tbuehler/video/titles.html] Your first option is to scale the range of output colors so they fit within the range 16-235. This can be accomplished using the "Levels" tool and setting the output range of each of the three color channels to have a lower limit of 16 and an upper limit of 235 (I would recommend saving these settings so you don't need to re-enter them each time). This will result in some degree of color shift for all pixels. You might prefer to just clip any colors which are outside the NTSC-recommended range so that they fall within the 16-235 range. This can be accomplished by creating two new layers above your original -- one of the layers should be filled with "NTSC black" (HTML=0x101010) and set to "Lighten only" mode; the other layer should be filled with "NTSC white" (HTML=0xebebeb) and set to "Darken only" mode. Another alternative would be to provide some "smooth" color adjustment (using the Curves tool, again with the channels handled separately) which would provide something of a compromise between the previous two options - retaining much of the pre-existing NTSC-safe colors but still exhibiting some contrast variation for the unsafe one. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-fu help
Quoting ASJF <[EMAIL PROTECTED]>: > Hi everybody ! > > I have made a script to resize picture... but it doesn't work anymore, I > have change something but I don't remember what... > Can someone help me? I suspect that you are using the development version (2.3) of the GIMP and your difficulty is caused by the fact that Script-fu has become more demanding that you follow proper Scheme programming guidelines than it used to be. In previous versions of Script-fu, you were allowed to 'set!' an undeclared variable and Script-fu would happily go ahead and define it for you. This is no longer acceptable -- you must declare your variables (with either 'define' or 'let*') before you use them. In particular, you have two variables -- 'f1-height' and 'f1-width' -- which need to be included in your 'let*' block. Once you do this, I think you will find your script to be functional. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] gimp-comment in batch file
In order to change the "gimp-comment" you must change a parasite that is attached to the image. The following code defines a function that will set the 'gimp-comment' parasite to the passed string. (Note: I don't have access to the GIMP right now, so I haven't tested it; though I think it will work.) Include the function definition in your file (I recommend inserting it right after the '(define (batch-test pattern)' line) and replace your (set! gimp-comment "Some Test Text") with (add-comment image "Some Test Text") ;;-- ;; 'add-comment' attaches "gimp-comment" parasite to 'image' ;; with the value of the passed 'string' ;; (define (add-comment image string) (*catch 'errobj (gimp-image-parasite-find image "gimp-comment") (if (not (null? errobj)) (gimp-image-parasite-detach image "gimp-comment") ) ) (gimp-image-parasite-attach (list "gimp-comment" 3 (bytes-append string))) ) --- Quoting David Woodfall <[EMAIL PROTECTED]>: > Hi, > > I'm trying to write a batch scm to insert a comment into a tiff. Here is > the test code. It appears to function correctly but does not seem to add > the comment: > > (define (batch-test pattern) >(let* ( >(filelist (cadr (file-glob pattern 1))) >(filename2) >(filename) >(image) >(drawable) >) > (while filelist >(set! filename (car filelist)) >(set! image (car (file-tiff-load RUN-NONINTERACTIVE filename > filename))) >(set! drawable (car (gimp-image-flatten image))) >(set! gimp-comment "Some Test Text") >(file-tiff-save RUN-NONINTERACTIVE image drawable "test.tif" > "test.tif" 0) >(gimp-image-delete image) >(set! filelist (cdr filelist)) >) > ) > ) > > I have no idea if (set! gimp-comment "Some Test Text") is the right way of > doing this but googling doesn't shed much light on it. > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] gimp-comment in batch file
OOPS! The 'if' statement should be "(if (null? errobj)". I had my logic backwards. Quoting [EMAIL PROTECTED]: > ;;-- > ;; 'add-comment' attaches "gimp-comment" parasite to 'image' > ;; with the value of the passed 'string' > ;; >(define (add-comment image string) > (*catch 'errobj >(gimp-image-parasite-find image "gimp-comment") >(if (not (null? errobj)) > (gimp-image-parasite-detach image "gimp-comment") > ) >) > (gimp-image-parasite-attach (list "gimp-comment" > 3 > (bytes-append string))) > ) > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Reg: Swapping Colors
Quoting Nandakumar KS <[EMAIL PROTECTED]>: > Hi, > > In the image am having, I want to swap the colors between red and blue. How > to do that using gimp??? > I would recommend using the Colors Channel Mixer. If you look at the screenshot for it in the online GIMP User's Manual (http://docs.gimp.org/en/plug-in-colors-channel-mixer.html), you will notice it showing the Output Channel chosen being Red and that it is configured to 100% Red with 0% for the Green and Blue components (this is what you would expect for the Red Channel to appear as Red :] ). If you change the slider values so that the Red Channel is set to 0% and the Blue Channel is at 100%, then the information in the Red Channel of your layer will be converted to Blue (you are halfway done). Now if click on the drop-down box for the Output Channel and select the Blue channel, you can change the settings for it so that the Red Channel is 100% and the Blue Channel is 0%. Once those two changes are made, you can click on the "OK" button. The Red & Blue channels will be swapped (this only happens on the selected region of the active layer, to have the change affect the whole image, you will need to merge your layers or apply the same settings to the other layers manually). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Channels
Quoting Victor Domingos <[EMAIL PROTECTED]>: > Is there a preference in GIMP, to make a channel appear as a > grayscale layer, instead of a red, green, or blue layer? Is > decomposing the image the only way to do this? I would laike to > compare two channels more easily, and the R/G/B color cast doesn't > seem to help... There is not really such an option built-in to the GIMP. If your main concern is just comparing the channels then you could create a layer from them rather easily by dragging the component (R,G, or B) from its position at top of the Channels dialog to the bottom, then dragging the resulting new channel over to your image window. You can drag a component directly to your image window, but realize that the components displayed in the Channels dialog will then be based on new layer; so in order to do this for the next channel, you would need to hide the layer. You might find a script I wrote a while back to be useful (http://flashingtwelve.brickfilms.com/GIMP/Scripts/decompose.scm). It decomposes a layer to its constituent components and uses those as layermasks to red-, green-, and blue-filled layers. It doesn't handle the alpha channel in the original layer (doing so would introduce some inherent difficulties that are worse than having the limitation). Once you have decomposed your layer using the script, you can edit the layermasks of the respective channels -- viewing either the resulting projection or using "Show layermask" to view the grayscale version of the respective channel (I would recommend assigning a quickkey to the Show Layermask function, as it is handy to switch between the two views). To restore the original layer, just make only the four layers (R, G, B, and black) visible, assure that none of them are showing its layermask, and do a Merge Visible. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Rounding those corners
> Hi gimp-user, > > How are you creating a single rounded corner, like those used for > css boxes with rounded corners. > > (i.e., http://www.csszengarden.com/063/corner_yelongreen_tr.gif) > > Or, if you wanted to outline an image's left, bottom, and right, sides > and round the lower corners (radius 8), so it would look like a "U" > without the tail and a flatter bottom (again for use in CSS > background for a round cornered semi-flexible box). There is a nice tutorial on GUG (GIMP Users Group) which suggests a method (http://gug.sunsite.dk/?page=tutorials). If you wish to have only certain corners rounded, I would propose rounding the corners on a duplicate layer then erasing the unwanted regions (or use layermasking) to reveal the original. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Writing values to a file from within GIMP
> Hi, > > I'm writing a script-fu GIMP plugin and I need to be able to write some > decimal values to a file during the execution of the script. I've seen > some > people suggesting that use of fprintf, etc., but can't figure out how to > get > this to work. Can someone please provide some guidance? If you are using GIMP 2.3.14 or later, the following code should demonstrate how to write to a file: (define outport (open-output-file "samplefile.txt")) (display "Hello" outport) (newline outport) (display "World" outport) (close-output-port outport) If you are using a stable version (2.2.x) of the GIMP, then you will need to use SIOD's 'fopen', 'fwrite', and 'fclose' functions. (define outfile (fopen "samplefile.txt" "w")) (fwrite "Hello" outfile) (fwrite "\n" outfile) (fwrite "World" outfile) (fclose outfile) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How do I put the tool bar back on the main Gimp page
> Somehow my tool bars have moved off of the main GIMP tool bar (the one > that opens files and stuff) and they have moved off to be their own > entities. I keep trying to make it reattach like it used to be but for > the life of me I can't figure out how to do it. Does anyone out there > know how??? Please help > http://i159.photobucket.com/albums/t140/Fatal_Edge/GIMP_Help/toolbox.jpg ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] New small user manual for gimp newbies made
> A small beginners minihowto about gimp is made. > > The idea is to get newbies started using gimp immediately, with the most > elementary things. > > Has taken me a long time, to learn gimp. > > The address is http://www.minihowto.org > > I am an old pensioner of some 66 years of age. > > This manual is supplementary to all the other documentation, which is out > there on the Internet etc. :-) That is a nice introduction. It is valuable to understand the experiences of new users; often experts and veterans have a difficult time writing manuals and tutorials because they "intuitively" understand concepts which prove to be significant barriers to the new user. One thing I would recommend: in your tutorial you should mention the importance of saving files in the XCF format while working on them. Many new users will save their multi-layered files as JPEG or PNG and then find out that the layers are no longer there the next time they use the GIMP. Saving as an XCF will retain all of the information associated with an edit session -- including layers, texts, paths, and selections -- so that the user can pick up where they left off. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] I need to know how much was cropped with autocrop
> On 8/1/07, David Gower wrote: > OTOH if you're just autocropping a *layer*, not an image, you can just > compare image corners to layer corners. While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?) Based on this behavior, there is no real advantage (from a scripting standpoint; you still have to process each layer individually) to doing a crop image as opposed to a crop layer. By processing each layer individually, its boundary offsets and dimensions remain relative to the original image, easing the task of comparing their "before" and "after" values. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] I need to know how much was cropped with autocrop
> On 8/1/07, David Gower wrote: > OTOH if you're just autocropping a *layer*, not an image, you can just > compare image corners to layer corners. While looking into this, I notice that autocropping an image uses the active layer, not the projection, to determine the resultant image boundaries. (Would this be a bug?) Based on this behavior, there is no real advantage (from a scripting standpoint; you still have to process each layer individually) to doing a crop image as opposed to a crop layer. By processing each layer individually, its boundary offsets and dimensions remain relative to the original image, easing the task of comparing their "before" and "after" values. (My apologies to David Gowers for responding to the wrong e-mail address.) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] GAP help, combining animations
Quoting Patrick <[EMAIL PROTECTED]>: > ... What I am still confused about is how to > append one animation to another. I tried the "map to" option with > different frame settings but the second animation just seems to get > imaged over the first rather then appended after it. > > Could anyone tell me how to append? Thanks for your time-Patrick The short answer is "use the VCR Navigator" but allow me to give an example. Let's assume you have a main animation to which you wish to append another clip. Open up the first frame from each of the animations and then perform a "Video->VCR Navigator" to raise its dialog window. At the top of the dialog window you will see a drop-down selector which allows you to choose which of the open animations is being "navigated". Set this selector to the clip which you are appending. Next, right-click on one of the thumbnails in the list and choose the "Select All" menu item. Again right-click on a thumbnail and choose the "Copy" option. Now go to the drop-down selector and choose your main animation. Scroll down to the very last frame, right-click on it, and select the "Paste After" option. It might take some time to perform the copy, depending upon how many frames you are adding. Once you are aware of this method, it should be obvious that it is very similar to the standard copy-n-paste used by most programs. It should be noted, though, that every frame of your source gets duplicated into a 'video buffer' directory which will make the process slower and require more disk space than the method proposed by Scott Bicknell (it does, however, leave the original clip intact). Also, this 'video buffer' directory will retain copies of the last cut/copy operation until you manually delete them (you can clear the video buffer from the right-click menu in the VCR Navigator). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] encoding help, please
Quoting Patrick <[EMAIL PROTECTED]>: > However it does not look like anyone has larger GIFs, about 300px > square, on their websites, no doubt due to the files sizes. I wanted to > also encode a video and post it on the web. I cannot get anything > encoded. I have a bunch of .xcf frames with serial numbers. I tried > converting them to .png and .tiff but nothing helps. I also downloaded > and set up mpeg2encode. It works from the command line but not from GIMP. > > I am running Ubuntu on a 64 bit machine. If anyone can tell me how to > get from the .xcf frames to encode any video format that would be terrific. If you are having problems with the built-in encoding that the GAP provides, I would recommend using "Video->Frames convert..." to save your animation as a sequence of PNGs and then (externally) use Mencoder to convert those PNGs to video. mencoder "mf://*.png" -mf fps=15 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4 Changing the FPS and output format as needed. For publishing on the web, you should consider using the Theora format and either Itheora (http://menguy.aymeric.free.fr/theora/index.php?l=en) or Metavid (http://metavid.ucsc.edu/) players. Itheora is more flexible but Metavid should be compatible with the HTML5 draft standard for online video. To produce OGG Theora video, you will need to use 'ffmpeg2theora' to convert your 'mencoder' output. I have some examples of the Itheora videos on http://flashingtwelve.brickfilms.com/Website/films.html ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to Apply an operation to ALL OPENED FILE... or how to do it simply?
> I have a photo collection with 2000 photos (from phone). This is one > collection, and I know that I can use "White-balance" (I don't know how > to say in english, I used hungarian gimp... It is in > layer/color/automatic menu: ) function on it. > But very problematic to open every photo, and do it one-by-one. > > Can I make a macro for this function? > > Or can I use the plug-ins/*.exe for do this? How to I do it? > > White-balance is the second submenu in the menu. > First is "Balancing", and sixth is "Normalize". If you install Dave Hodson's Batch Processor (http://members.ozemail.com.au/~hodsond/dbp.html), the AUTO LEVELS under the "Colours" tab will effectively perform an auto white balance. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to Apply an operation to ALL OPENED FILE... or how to do it simply?
Quoting David Hodson <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > >> If you install Dave Hodson's Batch Processor >> (http://members.ozemail.com.au/~hodsond/dbp.html), the AUTO LEVELS under >> the "Colours" tab will effectively perform an auto white balance. > > Actually, it calls "gimp_levels_stretch", which I think is the function > under the menu item "Stretch Contrast" (but I'm not sure). Looking at the source, it appears that "Auto->White Balance" calls "gimp_levels_stretch" while "Auto->Stretch Contrast" calls a plug-in called "c_astretch". ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Font quality in GIF files
Quoting Amit Ramon <[EMAIL PROTECTED]>: > Technically, as far as I understand, there should be no problem to > have a good > anti-aliased fonts in a gif file. The problem is with the very specific > method I (or gimp?) creates the gif. > > Does anyone here knows how can one create a decent anti-aliased text in gif > file? The unfortunate answer is that it cannot be done; there is, technically, a problem with anti-aliasing text over a transparent background. GIF implements transparency by specifying a single color in the colormap to be transparent. They (CompuServe?) could have defined the GIF file format to treat a range of indexes in the palette to represent varying levels of transparency, but they did not. There is nothing the GIMP can do to overcome this limitation of the GIF format. The PNG format DOES support an alpha channel, even in Index Mode; so you might see if that meets your needs. One thing to note is that converting to Indexed Mode in the GIMP will alias your layers even if the background of the image is not transparent. However, if you remain in RGB Mode and let the GIF save plug-in perform the Indexed conversion, the fonts will be anti-aliased properly (alternately, you could Merge the layers or flatten the image in RGB Mode and then convert the result to Indexed Mode). It is not ideal that the GIMP assumes the transparency limitation of the GIF format in its Indexed Mode editing but it is an understandably low priority problem. Discussions continue on how best (or even whether) to handle indexed images but it is unlikely that any changes will occur in the near future. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Create layered animation from a tiled animation.
Quoting Brian Vanderburg II <[EMAIL PROTECTED]>: > Out of need I created a script and finally got it working even on 2.3.18. > > Normally an animation is either done as one layer for each frame or > using GIMP Animation Package one file per frame. With the first > method, it is not possible to have multiple layers per frame since a > layer is a frame. With the second, multiple files must be kept. While > GAP is good, for simple animations it would be easier to just store > each frame in one image side by side. I would propose you consider modifying your script to handle the more generic case of multiple rows of tiles. Your dialog would need an additional entry for "Tile Height" and could provide a "Use image height (ie, Single Row)" checkbox for convenience. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] pdb.gimp_by_color_select malfunction .. workaround
Quoting Stephen Moss <[EMAIL PROTECTED]>: > Thanks David, > > I have to eat crow on this one... I plead fatigue ;-) > > Choosing the correct option does help a whole bunch: > CHANNEL-OP-REPLACE (2) <---correct answer > ... > CHANNEL-OP-ADD (0) doesn't work very well if everything has been > selected already! > > The problem file(s), xcf, must have been saved with "selected all" > already set from some previous operations. Another script to debug. Perhaps your difficulty stems from a problem with the 'gimp_channel_combine_masks' PDB function. If executed with replace for the op then the result is actually the sum of the two channels. In Script-fu: (gimp-channel-combine-masks dest-channel source-channel CHANNEL-OP-REPLACE 0 0) has the same result as with CHANNEL-OP-ADD. Personally, I would expect the dest-channel to be replaced with the source channel, but perhaps I am missing something. Regardless, it is an easy work-around. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] color info, was: infowindow
> thank you for your interest & help yes shift works e.g. with the > selection > tool but not with the pipette, though I see that shift enables the > checkbox > in the tool options of the pipette (I can also check it per mouse). but no > color info... > > do you see the entry color info in the menu view? where it has been under > version 2.2? > Although not presented in the same manner as the pipette's info window, perhaps you can use the Pointer ("zeiger" in German?) window available under the Dialog menu. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] batch mode debugging
RUN-NONINTERACTIVE is not a valid parameter for 'script-fu-fuzzy-border'. Quoting Milos Prudek <[EMAIL PROTECTED]>: > I simplified the above problem into the following script: > > (define (fuzzy-border-single filename) >(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) > (drawable (car (gimp-image-get-active-layer image > (script-fu-fuzzy-border RUN-NONINTERACTIVE image drawable '(255 255 > 255) 120 TRUE 9 FALSE 0 FALSE TRUE) > (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) > (gimp-image-delete image))) > > This script should be able to run with this command: > > gimp -i -b '(fuzzy-border-single "foo.jpg")' '(gimp-quit 0)' > > But it produces only this: > batch command: experienced an execution error. > > And it operates correctly if the script-fu-fuzzy-border line is replaced with > (plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable 1 1 1) > > > -- > Milos Prudek > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] batch mode debugging
Quoting Milos Prudek <[EMAIL PROTECTED]>: > How am I supposed to discover that RUN-NONINTERACTIVE is not a valid > parameter > for 'script-fu-fuzzy-border' if "run_mode" is in the parameter list in the > Procedure Browser, and furthermore plug_in_unsharp_mask does indeed work with > RUN-NONINTERACTIVE ? It is my understanding that ALL Script-fus are run non-interactively. My guess (I am not sure of this) is that the Procedural DataBase browser lists Run Mode as a parameter because it needs to be specified if calling Script-fus from either another scripting language such as Python or from a plug-in. Nontheless, Run Mode should not be specified when calling Script-fus from Script-fus. Quoting Milos Prudek <[EMAIL PROTECTED]>: > On Sunday 09 of September 2007 14:53:52 > [EMAIL PROTECTED] wrote: >> RUN-NONINTERACTIVE is not a valid parameter for 'script-fu-fuzzy-border'. > > You are right. Unfortunately when I remove RUN-NONINTERACTIVE, the script > fails anyway, this time with this error message: > > (jpeg:14957): LibGimp-CRITICAL **: gimp_drawable_get: assertion `width > 0 && > height > 0 && bpp > 0' failed > /usr/lib/gimp/2.0/plug-ins/jpeg: fatal error: Segmentation fault > The problem with your code is that, since the Fuzzy Border script is being asked to flatten the resulting image, the resulting layer does not have the same 'drawable' ID as before the flattening. If you do a second 'gimp-image-get-active layer' after flattening then you will be passing the proper 'drawable' ID to the save plug-in. The 'Segmentation fault' is a bit scary; the JPEG plug-in should probably test whether it has been passed an invalid drawable ID. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] batch mode debugging
Quoting Milos Prudek <[EMAIL PROTECTED]>: >> It is my understanding that ALL Script-fus are run non-interactively. > > script-fu-fuzzy-border can run interactively. It is available in > Right-click/Script-Fu/Decor/ menu in GIMP. It asks interactively for its > parameters. Is it an interactive run? The dialogs for Script-fus are generated and handled by the GIMP. Unlike plug-ins and other scripting languages, there is nothing that a Script-fu script has to do to interact with the user -- the parameters are defined by the dialogs before the 'script-fu-*' function is evaluated. This is why the function is considered non-interactive. >> not have the same 'drawable' ID as before the flattening. If you do a >> second 'gimp-image-get-active layer' after flattening then you will be >> passing the proper 'drawable' ID to the save plug-in. > > OK. I tried to implement your idea: > > (define (fuzzy-border-single filename) >(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) > (drawable (car (gimp-image-get-active-layer image > > (script-fu-fuzzy-border image drawable '(255 255 > 255) 120 TRUE 9 FALSE 0 FALSE TRUE) > (set! (drawable (car (gimp-image-get-active-layer image > (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) > (gimp-image-delete image))) > > But it outputs "batch command: experienced an execution error." > > I learned the basics of Scheme yesterday. Is this some kind of scope > error? Am > I changing a different "drawable" variable? Sort of. You have a couple of unwanted parentheses in your 'set!' statement and 'drawable' is being treated as a function. The appropriate syntax would be: (set! drawable (car (gimp-image-get-active-layer image))) You're doing well for only your second day with Scheme. One thing that might help you in debugging scripts is using the Script-fu console. If you open the console ("Xtns->Script-fu->Script-fu Console") and execute your command providing appropriate parameters: (fuzzy-border-single "/home/milos/somefile.jpg") then the error messages produced will be somewhat more useful than "experienced an execution error". ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] How to define Script-Fu widgets?
Quoting Milos Prudek <[EMAIL PROTECTED]>: > How are the various GUI widgets defined in Script-Fu? > > For instance Script-Fu/Decor/Fuzzy border: > - Border size GUI widget is a "number with arrows". > - Granularity GUI widget is a "slider with arrows". > > I look at the fuzzyborder.scm file. These GUI widgets seem to be defined > in "(script-fu-register)": > > SF-ADJUSTMENT _"Border size"'(16 1 300 1 10 0 1) > SF-ADJUSTMENT _"Granularity (1 is Low)" '(4 1 16 0.25 5 2 0) > > They are both SF-ADJUSTMENT, so why is the first GUI a "number with arrows" > and the second is "slider with arrows"? And what do the numbers (16 1 300 1 > 10 0 1) mean? The last argument determines the widget type. The list of numbers corresponds to (respectively): 'initial_value' -- starting value (subsequent calls will use LAST_VALUE instead) 'minimum' -- lowest value possible 'maximum' -- highest value possible 'step_size' -- amount to increment/decrement if clicked with mouse button #1 'page_size' -- amount to increment/decrement if clicked with mouse button #2 'digits' -- the number of decimal places: 0 = integers, 1 = tenths, 2 = hundredths, ... 'widget_type' -- 0 = slider, 1 = spinbutton @ Sven Neumann, thanks for clarifying how the interaction mode works. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] GIMP could not initialize the graphical user interface
Try it without the "sudo". When you use sudo, you are running as a different user and so your own user settings (ie, the DISPLAY) are ignored. Quoting "Samuel V. Green III" <[EMAIL PROTECTED]>: > I just finished a new install of GIMP version 2.2.14 via MacPorts. > > When I issue command : sudo gimp: I get this error: > > GIMP could not initialize the graphical user interface. > Make sure a proper setup for your display environment exists. > > In my .profile I do have the following added: > > export DISPLAY=:0.0 > > Any ideas why gimp will not start up? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Bit-depth Processing
Quoting gimp_user <[EMAIL PROTECTED]>: > ... An MVC architecture and user view customisation tools > would be much more attractive route because it would lay the groundwork for > emulating other tool sets including any future tools competitve to PS. The > challenge for gimp is how to create a long term strategy which may enable it > to flexibly meet future needs that cannot be accurately forecast now. MVC > architecture provides the flexibility required here. So IMHO the next major > version of GIMP requires a total recasting of the code structure in line with > an MVC architecture. The current system architectural is the major stumbling > block for the long term. Until that is solved I do not see GIMP moving away > from the beached whale status as far as its professional high quality image > manipulation future. > This criticism of GIMP development is the complete opposite of my perception. If anything, the speed of GIMP development has historically been hampered by the development team's focus on abstracting the different components of data, controls, and presentation. Splitting off the GTK and the GDK components as separate libraries certainly took away from GIMP development efforts at the time. The language-agnostic plug-in system was a forerunner in bringing MVC architecture to an application at a level which permitted users to actually redefine the capabilities of the program -- and while 'libgimp' is typically employed by GIMP plug-ins, it is available for any other project to link with as a library entirely separate from the GIMP. The GIMP developers often choose to enhance the abilities of the tools/libraries upon which it relies, rather than opt for a "quick fix" GIMP-specific solution. They have not only followed, but have contributed to internationalization, menu/dialog functioning, even the underlying GObject system of 'glib'. (Any "scorn" of GIMPshop which may have occurred is owing to its developer NOT wanting to work within the framework of the existing "MVC architecture", and NOT wishing to enhance its capabilities; rather than the GIMP developers shunning MVC.) Regarding the 8-bit color model being discussed and a call for the "total recasting of the code structure", that is precisely the decision that was made about six years ago: to factor out the image storage model and abstract the access and manipulation of that storage. The approach chosen was to make such functionality a separate library (GEGL) and continue with the GIMP's development until such time as the library was ready for incorporation into the GIMP code. Certainly the GIMP developers could have kludged the code to incorporate 16-bit or higher bit-depths; and it would not have taken nearly as long to do so. But the solution would be only temporary -- the ultimate necessity to have a separate library would still exist -- and would only apply to the GIMP project. Far from "burnishing its own image", the GIMP developers opt for the best approach and the long-term solutions, often to the cost of short-term expectations. They unselfishly aim to factor their code in a way that benefits all free software projects, not just the GIMP. There should be great pride in doing things "right", even if it may take longer[1]. [1] Personally, I don't think it does take longer. When one looks at the big picture, the short-term solutions ultimately lead to greater amounts of development effort and such projects eventually need to adapt to the more generalized approach or they bog down. For a commercial company (such as Adobe), expending developer resources to produce short-term kludges can be justified if their is compensation from their customer base and if it maintains a marketplace edge over their competitors. In the "real world" of Free Software development, such efforts amount to nothing more than inefficiency in developer resources. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Selection Across Layers
Quoting Asif Lodhi <[EMAIL PROTECTED]>: > I've begun using Gimp again after a long time. IIRC, one (more?) tool > of Gimp had an option of making a selection that went through all the > layers right to the bottom layer. And, IIRC, having made that type of > selection in one of the top layers and performing an operation on it > would carry out the operation on the combined output of all of the > bottom layers. May be I am wrong here but I do vaguely recall such an > option after reading on this list about non-destructive editing > features of a commercial photo-retouching applications. To my knowledge, there are no operations which behave that way. If you have installed the GAP (GIMP Animation Package) then you can use the "Filter All Layers..." command but this is limited to only those filters which are specially registered with this capability (i.e., it does not work with "tools" such as Move or Rotate, nor with most "third-party" scripts). It is a very useful utility and nearly all of the GIMP's core filters ARE available. In version 2.4 of the GIMP (which is in the final stages before release), if you have a selection and the active layer is linked to other layers, performing a Transform (rotate, scale, perspective, skew, or flip) will affect the contents of the selection on the active layer but will affect the entirety of the other linked layers. I can't recall if version 2.2 behaved this way. The Move tool behaves differently in that it is not possible (in version 2.4) to use it to move the contents of the selection; and the established method of doing so (using the Selection tools) does not honor layer linkages. In order to Move or Transform the selection contents across multiple layers, I have written a Script-fu which will "float" the selection for each linked layer. Once they are floated as separate layers, the floated layers can be Moved or Transformed as a group (the script links the floated layers) and subsequently merged back down to their original layers. My script is quite a kludge: you must be careful with any changes to your layerstack while the selections are "floated", and some blending modes of layers will not behave as expected. If interested, you can read more about the script at http://www.gimptalk.com/forum/topic.php?t=13996&start=1 In general, if you find yourself operating in a manner such that this script is useful then I would recommend that you rethink your overall approach to what you are editing and try not to have objects which you wish to treat separately sharing the same layer to begin with. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] FW: Question on copy from selection
Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>: > I have a question on copying a portion of an image in gimp. First, > a little context. I needed to create a layer with only some > features in an image. For that, I first selected a suitable area in > the image using the "Free Select" tool. I then copied its contents > (Edit -> Copy) and pasted it (Edit -> Paste) in a new layer (Layer > -> New Layer). This creates a new layer with only the desired > features, as can be verified making the new layer the only visible > layer. Now, if I go to the "Channel Dialog", I can see the RGB and > alpha channels looking right, with only the selected features there. > However, if I make a copy of one of the RGB channels (right-click > on the R channel, for example, and duplicate it), there is more than > just those features, as can be verified by making it the only > visible channel. > > My question then is if this is a correct behavior and if so, how can > I make a copy of a selection with only the contents of that > selection? Thank you, > First it should be realized that layers are always rectangular in shape. The new layer you created, even though it might an oval or some freedrawn shape, will still be rectangular (the smallest rectangle aligned with the XY-axes that fits the shape). The regions that lie outside of your selection but within the layer bounds still contain RGB data; however, the alpha channel is set to make those areas transparent. (You probably know this already, I just want to lay the foundation.) As to whether the behavior of the thumbnail previews for the RGBA components is correct: well, sort of. What you are seeing in the Channels Dialog is that the thumbnail previews of the RGB components have the Alpha channel applied to them; even though the actual contents of the RGB channels are still there (the corresponding alpha data renders it transparent). Even though the preview of the components don't display the RGB data, when you Duplicate the channel, that data (which was obscured by the alpha channel) gets copied to the duplicate. http://flashingtwelve.brickfilms.com/GIMP/Temp/GIMP-challenge.png is a sample image that will demonstrate this clearly. The RGB data of the image contains a photo of the Eiffel Tower, however, the alpha channel is black rendering the image completely transparent (and the previews in the Channels dialog will all be black). If you duplicate the Red channel (as you did for your selection) then the new channel will contain the original red data of the Eiffel Tower picture. As to how to make a channel (or selection) out of the contents of the selection, there are a few different approaches. Using your technique to produce the Red channel duplicate (which includes extraneous RGB data), go back to your new layer and perform an alpha to selection. Then invert the selection, activate your Red channel duplicate, and perform an "Edit->Fill with BG Color" (assuming your BG is black). OR... After copying your selection to a new layer, perform a "Layer->Layer to Image Size" and drag it over to the Channels window. (If you want just the red channel data, you should hide the green and blue components and do a "Copy visible" when creating your new layer; otherwise your channel will be the overall RGB value.) OR... I wrote a script a while ago which creates a selection from a layer (or channel, or mask). It honors a selection if one exists (that is, the contents of the selected region become the selection) so if I am understanding you correctly, it might suit your needs. The file for the script is located at http://flashingtwelve.brickfilms.com/GIMP/Scripts/layer-select.scm and includes two other commands (all three commands are added to the "Select" menu), so I will just describe them briefly: "Select->Layer bounds" -- simply selects the entire layer; sort of like Select->All but if you switch layers the selection stays the same. "Select->To Layer" -- creates a new layer out of the selection using the FG and BG colors. Uses BG color to represent 'selected', so default colors generate a proper mask. The new layer has the same dimensions as the image. "Select->From Drawable" -- creates a selection from the contents of the selected region. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] file-glob problem in 2.4.0rc3
'file-glob' used to return a list of strings in GIMP 2.2, now it returns a vector. You can make your code work by using the following substitution: (car (vector->list (cadr (file-glob "*.png" 1 However, Script-fu should probably be amended to return lists for PDB STRINGARRAY values (if possible). Quoting Christian Anthon <[EMAIL PROTECTED]>: > The following used to work in gimp 2.2: > > running under gimp -b -i - > > (car (cadr (file-glob "*.png" 1))) > > returned > > "222.png" > > but now I get > >> (car (cadr (file-glob "*.png" 1))) > > Error: car: argument 1 must be: pair > > So obviously something changed, I just don't know enough about > script-fu to know what. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] colour to black and white
It seems you would basically want an inverted copy of the blue channel with white regions being transparent. There are dozens of ways to accomplish this. I would propose the following: Decompose you image to RGB components. In the new image, hide the red and green layers. Add a layermask to the blue layer, initialized to a "Grayscale copy of the layer". Fill the blue layer with black. OPTIONAL: Most orthochromatic film would respond to some extent to green, so repeat the last two steps on the green layer, make it visible, and set its opacity to a relatively low value (0-30%). This method is a bit crude, but should provide something not entirely unsuitable. A more accurate approach would probably entail applying appropriate curves to the different color channels. Quoting norman <[EMAIL PROTECTED]>: > I would like to be able to produce a black and white negative image from > an ordinary colour image. The effect I would like to produce would be to > imitate what one would get if you took a colour, positive transparency > and made a contact print on to either orthographic or lithographic film. > Thus, blue would be black and red would be clear and transparent. Have > you any suggestions how to approach this using the Gimp, please. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] colour to black and white
There should be no white in the resulting image. When you decompose to RGB ("Colors->Components->Decompose"), you end up with a grayscale image with three layers -- one each for the red, green, and blue components. When you add the layermasks, you are basically making the the black parts of the layers transparent and the white parts opaque. When you fill the layer with black, you convert the opaque parts to black. The end result is a layer consisting of black parts and transparent parts (your lithographic negative). There should be no white in your image. Perhaps you could describe the steps you are taking which produced an overlay of white and black squares? Quoting norman <[EMAIL PROTECTED]>: > This is very interesting and to a learner like me not too complicated. > Perhaps I did not do it quite right but I have what appears to be an > overlay of small black and white squares. How do I get rid of that? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] colour to black and white
Oops, I just realized that what you describe may be attributed to the fact that GIMP will display a dark gray/light gray checkerboard to indicate transparent regions. Perhaps you have created your lithograph correctly but misinterpreted this representation of transparency. You might try creating a new white layer and placing it at the bottom of the layerstack to show the regions where your image is transparent. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Trouble calling filter plug-ins from script-fu console
You must supply the appropriate drawable ID to the plug-in. Per your example: (plug-in-autocrop 1 4 (car (gimp-image-get-active-layer 4))) Quoting Sam Kuper <[EMAIL PROTECTED]>: > I want to apply a filter plug-in via the script-fu console, but this doesn't > seem to work. I have tried with several plug-ins, with no success. I have > tried this on GIMP 2.0.5 on RedHat Enterprise Linux and GIMP 2.4.1 on > Windows XP SP2. > > Let's take a simple example. Suppose I have a .png image open in GIMP, and > it is image 4. It has only one layer. It has an excessive white border, so I > want to autocrop it. > > If I go to the script-fu console and enter: > > (plug-in-autocrop 1 4 0) > > In 2.4.1 on WinXP I get a message "Error: Procedure execution of > plug-in-autocrop failed" and the error console displays a series of errors: > > ... > > If I use a number other than 0 for the drawable, however (I've tried every > integer from -2 to 2) then I still get an error. (NB. on Linux the situation > is no better, but the error messages are different.) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Trouble calling running batch script in Windows XP
I do not believe that single-quoting a command line argument in Windows works the same as BASH (Linux). Try using double-quotes and escape any double-quotes which appear in your argument: gimp -i -b "(batch-CUPify \"*.png\")" -b "(gimp-quit 0)" If you include directories in your path, also escape your backslashes: gimp -i -b "(batch-CUPify \"D:\\Documents and Settings\\spk30\\Desktop\\alison_sl1_dear_friend_backup\\*.png\")" -b "(gimp-quit 0)" You may need to experiment as I do not run Windows and have no way of testing the commands. > I am using GIMP 2.4.1 on Windows XP, and I am trying to run the script by > going to the command prompt, changing to a directory full of .png files I > want to process with the script, and entering the command: > > gimp-2.4 -i -b '(batch-CUPify "*.png")' '(gimp-quit 0)' > > This gives me the following messages: > > "GIMP-Error: Opening 'D:\Documents and > Settings\spk30\Desktop\alison_sl1_dear_fri > end_backup\*.png)'' failed: Invalid argument > > GIMP-Error: Opening 'D:\Documents and > Settings\spk30\Desktop\alison_sl1_dear_fri > end_backup\'(gimp-quit' failed: No such file or directory > > GIMP-Error: Opening 'D:\Documents and > Settings\spk30\Desktop\alison_sl1_dear_fri > end_backup\0)'' failed: No such file or directory > > No batch interpreter specified, using the default > 'plug-in-script-fu-eval'. > batch command: executed successfully." > > > I would be very grateful for any help you can offer. > > Many thanks in advance, > > Sam > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] GAP scripting?
> I need to do a complicated GAP animation. > It involves many steps that I will probably need to redo several times. > A script that I could edit and re-run multiple times so that I can get > it right. I don't believe such functionality currently exists unless you write a dedicated plug-in. You could, however, use the 'filter-macro' to apply a set of multiple filters in one pass as long as you do not have to repeat the same filter with different values ('filter-macro' uses the Last Values with which the filter was run). For example, you could set up a filter macro which in one pass would... Apply a Gaussian blur with radius of 10 Apply a color curve Perform a threshold Perform a gradient map ... upon all of the layers specified in the Frames Modify call. However you could NOT, within that set, have a second Gaussian blur with a radius of 20 (you could repeat the radius=10 blur though) and you could not include operations which are not filters (such as resize or duplicate the layer). Overall, it is of very limited utility but, if the situation is just right, it can provide some benefit. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Whitebalance Function
> I try to write a Perl script which automatically adjusts the white > balance on images with gimp. In gimp there exists the function > Colors->Auto->Whitebalance, but I'm unable to find the corresponding > function in the PDB. "Colors->Auto->White Balance" calls the PDB function 'gimp_levels_stretch'. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Save all opened files with ONE click, or with script...
> And next I need to close every opened files one by one with clicking on > [X], and Save, and Save with defaults. > This section is very hateable, slow, and automatizable (I think). > > But I don't know, how to do it! It is, to my knowledge, impossible for a script or plug-in to close an image which it did not open. I believe this is to ensure that multiple processes running simultaneously do not interfere with each other (for example, a script or plug-in closing an image while another script is still working on it). I was able, however, to write the following short Script-fu which will save all of your open images. This will allow you to save and close all of your images by performing a "File->Save ALL" followed by a "File->Close all". Save the following lines to "C:\Documents and Settings\durumdara\.gimp-2.4\scripts\saveall.scm" ;;; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. (define (script-fu-save-all-images) (let* ((i (car (gimp-image-list))) (image)) (while (> i 0) (set! image (vector-ref (cadr (gimp-image-list)) (- i 1))) (gimp-file-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-layer image)) (car (gimp-image-get-filename image)) (car (gimp-image-get-filename image))) (gimp-image-clean-all image) (set! i (- i 1) (script-fu-register "script-fu-save-all-images" "/File/Save ALL" "Save all opened images" "Saul Goode" "Saul Goode" "11/21/2006" "" ) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Save all opened files with ONE click, or with script...
> Sven Neumann wrote: > Sure, just register it as " better, just use "Save All" where the full menu path was given and add > the line > > (script-fu-menu-register "script-fu-save-all-images" > " Sven Neumann wrote: > Also the script should not be called "script-fu-save-all-images". Please > use a different namespace when you are writing scripts to avoid name > clashes with other people's scripts. Personally, I find this script to be dangerous and hope it does not proliferate beyond the original poster's specific use case. But could you please explain a little further why the naming is improper? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Save all opened files with ONE click, or with script...
> Sven Neumann wrote: > > "script-fu-save-all-images" is a name in the script-fu namespace. This > namespace should be kept for scripts that are distributed with > Script-Fu. It would be safer to call your script for example > "saulgoode-save-all-images". If we ever added a script called > "script-fu-save-all-images" to GIMP, your script would not clash with > it. Thanks again for the information. It is a very reasonable policy of which I was unaware. From what I have seen, the vast majority of third-party Script-fu authors also are unaware of this and there is a Script-fu tutorial on GIMP.org which recommends using the "script-fu-" namespace (see below). There is currently a fairly extensive effort ongoing to update older scripts to assure compatibility with the TinyScheme-based interpreter. Would you recommend that these updates be encouraged to avoid the "script-fu-" namespace? If so, can we perhaps recommend a namespace convention for third-party scripts that might be more standardized? While using the script author's name as a base for the namespace would solve conflicts, perhaps we could also suggest a prefix to that so that third-party scripts would be easily recognized and grouped within the PDB browser (e.g., using "sf-author-" as a namespace). == http://docs.gimp.org/en/gimp-using-script-fu-tutorial-first-script.html 3.4.4. Naming Conventions ... It's GIMP convention to name your script functions script-fu-abc, because then when they're listed in the procedural database, they'll all show up under script-fu when you're listing the functions. This also helps distinguish them from plug-ins. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user