Re: [Gimp-user] gradient based on manual (lasso) selection
On 12/26/2010 07:55 PM, Eric P wrote: > GIMPers, > > Is there a way to create a gradient (black->white) based off a closed lasso > selection? So the resulting gradient would > start black along the edge of the selection and expand out to white in all > directions away from the selection. > > My end goal is to create a quick mask that I can blur to create a background > with an exaggerated out of focus look. > > Thanks for reading (hope that all made sense)! > Eric That's one of the uses of the WrapMap filter I wrote: http://registry.gimp.org/node/24754 http://sourceforge.net/projects/gimp-wrapmap/ Added bonus: you can run WrapMap to create the wrapped gradient in the layer mask. And if you use the "curves" dialog/tool on the mask you can change the linear gradient to something else and thus control finely how the blur appears. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] gradient based on manual (lasso) selection
GIMPers, Is there a way to create a gradient (black->white) based off a closed lasso selection? So the resulting gradient would start black along the edge of the selection and expand out to white in all directions away from the selection. My end goal is to create a quick mask that I can blur to create a background with an exaggerated out of focus look. Thanks for reading (hope that all made sense)! Eric ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient lighten
On Fri, Mar 10, 2006 at 10:07:46AM -0800, Bill W. wrote: > Hi all, > Quick newbie question. I have a photo that is full bright on one side, the > left; and subdued light on the right. It seems to be an excellent job for > gradient and layers but I'm not sure how to go about getting started. > I checked in tutorials and couldn't find anything on this specifically. > first, read the earlier thread on adding the alpha channel to the photograph. then use the right click menu in the layers dialog and add a mask to the photograph layer then use the blend tool to add a gradient. you can adjust where the gradient colors start and end in the gradient editor (right click there also to find options for this) the strength of the gradient you are painting can be adjusted in the blend tool options. probably, you will need to add an all black or all white layer under the photograph layer. (or maybe a duplicate of the photograph instead) carol ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] gradient lighten
Hi all, Quick newbie question. I have a photo that is full bright on one side, the left; and subdued light on the right. It seems to be an excellent job for gradient and layers but I'm not sure how to go about getting started. I checked in tutorials and couldn't find anything on this specifically. tia, Bill W. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] gradient selection tool
Hi folks, I have this idea for a more usefull selection tool: a gradient selection tool. I even have an idea about the algorithm: 0) a seed pixel is selected 1) do a feather selection (magic wand) | RGB(pixel)-RGB(seed) | < treshold 2) calculate a (linear) gradient that fits the selected pixels the best 3) now do a new selection | RGB(pixel)-RGB(gradient(pixel)) | < treshold I've looked at the sources the feather select tool, but I do not see an easy way to implement this myself... any seasoned gimpers that could implement this quickly? of course, typical variations could be RGB-> R or G or B or H or S or V ... -- lode -- Plaats je zoekertjes GRATIS op AdValvas Placez votre petite annonce GRATUITEMENT sur AdValvas http://www.advalvas.be ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
Nem W Schlecht wrote: > Any update on this, Bill? Thanks for the reminder. Okay, I have uploaded the code to the Gimp Plug-In Registry, at: http://registry.gimp.org/plugin?id=4169 You should have a working gimptool-2.0 in order to install it. Best, -- Bill __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
> http://gug.sunsite.dk/pictures/1080149573.png This is looking really great !!! Hope to play with it soon. Thanks -- Przemek Gawronski gawronskip#at#wp#dot#pl Linux Registered User 239544UIN:8358522 http://counter.li.org/ ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On St, 2004-03-24 at 09:47 -0800, William Skaggs wrote: > For what it's worth, I went ahead and implemented a true variable blur filter, That's the spirit! Looking forward to it. cheers -- even a stopped clock gives a right time twice a day. ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
For what it's worth, I went ahead and implemented a true variable blur filter, by modifying the "blur" plug-in code from 2.0. I'll put the code in the plug-in registry after a little bug-fixing, but anyway, I put together a comparison of what you get with variable blurring versus what you get with variable blending of blurred and sharp images -- you can see it at: http://gug.sunsite.dk/pictures/1080149573.png Please note that I am not saying that one is better than the other, just that they are different. Best, -- Bill __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
V Po 22. 03. 2004 v 11:38 -0800 píše William Skaggs: > >Uh? It works pretty well I'd say: > >http://jimmac.musichall.cz/stuff/linearblur.png > > To my eyes this image looks sharp in the lower 2/3, and uniformly blurred > in the upper 1/3. What you _do_ get using this method is a nice smooth > transition from blurred to unblurred, which may be all you need in many > situations, especially if the blur is rather soft. Didn't occur to me prior this, but you are in fact right. Another workaround of this limitation than the GAP method may be using a huge soft parametric brush so that it's as high as the image height and paint a few lines on the top egde (so a half of the brush covers the image) using the blur tool. One needs to zoom out a bit to get a bit of space on the image border. cheers -- Jakub Steiner <[EMAIL PROTECTED]> ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
>Uh? It works pretty well I'd say: >http://jimmac.musichall.cz/stuff/linearblur.png To my eyes this image looks sharp in the lower 2/3, and uniformly blurred in the upper 1/3. What you _do_ get using this method is a nice smooth transition from blurred to unblurred, which may be all you need in many situations, especially if the blur is rather soft. I note also that you are using a bit of a trick here: the line of the eyes creates a boundary in the image that makes it very difficult to perceive gradations of blurriness at about the same level. Best, -- Bill __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On Po, 2004-03-22 at 09:12 -0800, William Skaggs wrote: > Neither of these techniques work, as you will see if you try to apply them. > When you mix a blurred image with a sharp image, the result does not look like > a less-blurred image, it looks like a sharp image whose contrast has been reduced. Uh? It works pretty well I'd say: http://jimmac.musichall.cz/stuff/linearblur.png -- Jakub Steiner <[EMAIL PROTECTED]> ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
Yes, these should work, although there are a couple of things worth pointing out. First, the blur filters ignore the selection when computing their result, and only apply it afterwards -- this makes your approach work, but means that it can take a very long time if the slicing is fine. Second, if the filter does not ignore the selection, your approach might not give the right results. >From a mathematical point of view, a variable blur is a rather special thing, and I think in the long run there is no substitute for just biting the bullet and doing it correctly. But your approach is definitely better than the others that have been suggested. Best, --- Bill >I had thought about this. >What I found out is that tit will be easy to modify the "filter all >layers" GAP filter to to right that: >Add a "select map image" widget, and a "value step" choice. > >On the map image, make a selection by value range. For each value >range apply the filter on the target image, with the obtained >selection. > >I will try to work on that. > >Meanwhile, the scripts I posted on the other message can work for >applying a single filter with a linear variation across a image. > >Regards, > JS > -><- > > __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
>On 20 Mar 2004, Sven Neumann wrote: >> Combining a blurred picture with an unblurred picture using layer mask >> seems to work well for me. Of course it's not the same but it should >> look reasonably similar. >> >On Fri, 19 Mar 2004, Jakub Steiner wrote: >> Just create an appropriate selection for the blur filter. The fastest >> method in this case would be toggling the quickmask, creating the >> gradient, toggling back and applying the blur filter. > > What is the best technique? What you suggest or the one that follows? Are >there any problems with these two ways, compared with the "mod of the blur >filter" way? Neither of these techniques work, as you will see if you try to apply them. When you mix a blurred image with a sharp image, the result does not look like a less-blurred image, it looks like a sharp image whose contrast has been reduced. Best, -- Bill __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On Saturday 20 March 2004 14:38, William Skaggs wrote: > Actually the reality is that Gimp, with the standard plug-ins, does > not have the ability to do this, although there are ways to fake > something that looks sort of like it. The easiest way to get it > would be to modify the "blur" filter (found in randomize.c in the > plug-ins directory) so that the probability values are derived from > a map-image rather than constant. This would really be a valuable > thing to have. > > Best, > -- Bill I had thought about this. What I found out is that tit will be easy to modify the "filter all layers" GAP filter to to right that: Add a "select map image" widget, and a "value step" choice. On the map image, make a selection by value range. For each value range apply the filter on the target image, with the obtained selection. I will try to work on that. Meanwhile, the scripts I posted on the other message can work for applying a single filter with a linear variation across a image. Regards, JS -><- ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On 20 Mar 2004, Sven Neumann wrote: > "William Skaggs" <[EMAIL PROTECTED]> writes: > > > Actually the reality is that Gimp, with the standard plug-ins, does > > not have the ability to do this, although there are ways to fake > > something that looks sort of like it. The easiest way to get it > > would be to modify the "blur" filter (found in randomize.c in the > > plug-ins directory) so that the probability values are derived from > > a map-image rather than constant. This would really be a valuable > > thing to have. > > Combining a blurred picture with an unblurred picture using layer mask > seems to work well for me. Of course it's not the same but it should > look reasonably similar. > What is the best technique? What you suggest or the one that follows? Are there any problems with these two ways, compared with the "mod of the blur filter" way? On Fri, 19 Mar 2004, Jakub Steiner wrote: > Just create an appropriate selection for the blur filter. The fastest > method in this case would be toggling the quickmask, creating the > gradient, toggling back and applying the blur filter. > ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
Hi, "William Skaggs" <[EMAIL PROTECTED]> writes: > Actually the reality is that Gimp, with the standard plug-ins, does > not have the ability to do this, although there are ways to fake > something that looks sort of like it. The easiest way to get it > would be to modify the "blur" filter (found in randomize.c in the > plug-ins directory) so that the probability values are derived from > a map-image rather than constant. This would really be a valuable > thing to have. Combining a blurred picture with an unblurred picture using layer mask seems to work well for me. Of course it's not the same but it should look reasonably similar. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
Actually the reality is that Gimp, with the standard plug-ins, does not have the ability to do this, although there are ways to fake something that looks sort of like it. The easiest way to get it would be to modify the "blur" filter (found in randomize.c in the plug-ins directory) so that the probability values are derived from a map-image rather than constant. This would really be a valuable thing to have. Best, -- Bill __ __ __ __ Sent via the KillerWebMail system at primate.ucdavis.edu ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On Friday 19 March 2004 07:36, craniac wrote: > Przemyslaw Gawronski wrote: > > I'm looking for tool that would give me a blur efect but with > > a gradient intencity. That is at the begining I would have a > > sharp pic but gradualy get more blured and more and more ... > > (going from left to right for example). > > Make a copy of the layer you want to blur. Blur the copied layer and add a > layer mask to it. Then fill the layer mask with a black to white gradient. That might not have the desired effect. It ' s a 4 liner scripfu -or python -fu that would slice the image in rectangular selections and run the filter variably on these rectangles what he is needing. I made such a filter in python fu once, and I'd paste it here, if I had it. I did it with the pixelize filter, all one have to do is to change the filter used. It is in the script-fu list in yahoo.com archives, however. - The person taht was needing it did not had pythofu working, so I posted it there for someone to translate it into scriptfu (I have too many things to do rather than trying to figure Scheme out) /me googles for "gwidion script pixelize gradient" and clicks on first result. /me pastes result here. (I will remove the ">>" from the scripts for them to work., If you settle for the python one, beware of the spacing. On Monday 17 November 2003 06:12, [EMAIL PROTECTED] > wrote: > > Here you are. Tested under gimp 1.3.22 (windows) > > > > Guillaume > > > > > > (define (script-fu-grad-pixelize img drawable left-ammount right-ammount divisions) (define (floor x) (- x (fmod x 1))) ;there is no floor function in script-fu ! (let* ( (width (car (gimp-image-width img))) (height (car (gimp-image-height img))) (slice-width (floor (+ (/ width divisions) 1))) (slice-pixelize (/ (- right-ammount left-ammount) divisions)) (i 0) ) ;end declarations (while (< i divisions) (gimp-rect-select img (floor (* i slice-width)) 0 slice-width height 2 0 0) (plug-in-pixelize RUN-NONINTERACTIVE img drawable (+ left-ammount (* i slice-pixelize))) (set! i (+ i 1)) ) ;end while ) ;end let (gimp-displays-flush) ) ;end define (script-fu-register "script-fu-grad-pixelize" "/Script-Fu/Alchemy/Gradient Pixelize" "Horizontal Gradient Pixelizer" "Joao S. O. Bueno, Guilhaume" "(k) All rites reversed - JS" "2003" "*" SF-IMAGE "img" 0 SF-DRAWABLE "drw" 0 SF-VALUE "ammount to pixelize at left" "1" SF-VALUE "ammount to pixelize at right" "10" SF-VALUE "how many divisions on the image" "10" ) > > > -Original Message- > > > From: Joao S. O. Bueno > [mailto:[EMAIL PROTECTED] > > > Sent: 16 November 2003 14:11 > > > To: [EMAIL PROTECTED] > > > Subject: [script-fu] Help writting in Scheme... > > > > > > > > > Hi there, > > > > > > A friend of mine wanted to apply a filter (pixelize), with valuer > > > varying from the image left to its right. > > > > > > I quicly wrote him a python-fu script to that. But it is in > > > python, and he had some problem configuring gimp-python. > > > > > > I simply an not able to learn this scheme native scripting... > > > > > > :-) So, I will paste my python script here, and ask if > > > > > > someone could be kind enough to re-write it in scheme. > > > > > > Thanks in advance. > > > > > > JS > > > -><- #!/usr/bin/env python from gimpfu import * from math import floor def grad_pixelize (img, drawable, left_ammount, right_ammount, divisions): width=pdb.gimp_image_width (img) height=pdb.gimp_image_height (img) slice_width=floor(float(width)/divisions)+1 slice_pixelize=float(right_ammount-left_ammount)/divisions for i in xrange (divisions): #change here for a call to blur. pdb.gimp_rect_select (img,floor (i*slice_width), 0,slice_width, height, 2,0,0) pdb.plug_in_pixelize (img, drawable, left_ammount+i*slice_pixelize) register( "grad_pixelize", "Horizontal Gradient Pixelizer", "Horizontal Gradient Pixelizer - honest", "Joao S. O. Bueno", "(k) All rites reversed - JS", "2003", "/Python-Fu/Alchemy/Gradient Pixelize", "*", [ (PF_INT, "left_ammount", "ammount to pixelize at left", 1), (PF_INT, "right_ammount", "ammount to pixelize at right", 10), (PF_INT, "divisions", "how many divisions on the image", 10), ], [], grad_pixelize) main() ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient-blur
On Fri, 2004-03-19 at 11:04 +0100, Przemyslaw Gawronski wrote: > Hi Gimpers > > I'm looking for tool that would give me a blur efect but with a > gradient intencity. That is at the begining I would have a sharp pic but > gradualy get more blured and more and more ... (going from left to right > for example). > > I would be thankful for sugestions on how I can do that in Gimp (2.0 > pre4 ofcource). Just create an appropriate selection for the blur filter. The fastest method in this case would be toggling the quickmask, creating the gradient, toggling back and applying the blur filter. cheers -- Jakub Steiner <[EMAIL PROTECTED]> ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
RE: [Gimp-user] gradient-blur
Przemyslaw Gawronski wrote: > I'm looking for tool that would give me a blur efect but with > a gradient intencity. That is at the begining I would have a > sharp pic but gradualy get more blured and more and more ... > (going from left to right for example). Make a copy of the layer you want to blur. Blur the copied layer and add a layer mask to it. Then fill the layer mask with a black to white gradient. -- Steve Crane http://craniac.afraid.org ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] gradient-blur
Hi Gimpers I'm looking for tool that would give me a blur efect but with a gradient intencity. That is at the begining I would have a sharp pic but gradualy get more blured and more and more ... (going from left to right for example). I would be thankful for sugestions on how I can do that in Gimp (2.0 pre4 ofcource). Thanks Przemek -- Przemek Gawronski gawronskip#at#wp#dot#pl Linux Registered User 239544UIN:8358522 http://counter.li.org/ ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Gradient and Palette conversions
On Tue, 2003-09-23 at 04:01, Sven Neumann wrote: > Hi, > > What warnings do you get exactly? Perhaps we could suppress them or > make them more subtle warnings that appear on the console only. > I'm sorry -- I didn't make myself clear (too late at night, I guess.) The warnings were on the console, not in gimp-message boxes, and were to the effect that the palette was not in current gimp format, falling back to legacy mode ... It wa irritating because I have a large number of palettes and the plethora of messages made it difficult to find other, possibly more important, error messages amid the clutter. I have successfully converted both the gradients and the palettes and now the messages have stopped. -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzsHome Page http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery http://trefftzs.topcities.com/ Photo Gallery ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Gradient and Palette conversions
Hi, Jeff Trefftzs <[EMAIL PROTECTED]> writes: > On Mon, 2003-09-22 at 17:14, Sven Neumann wrote: > > Hi, > > Oh? Actually 1.3 is supposed to read the 1.2 palette and gradient > > files directly. Did we break backward compatibility? If so, this should > > better be fixed. > > > Gimp-1.3.20 seems to read the 1.2 palettes and gradients properly, but > it complains mightily about having to use the legacy format. These are > purely for convenience and to reduce the number of warnings at load > time. What warnings do you get exactly? Perhaps we could suppress them or make them more subtle warnings that appear on the console only. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Gradient and Palette conversions
On Mon, 2003-09-22 at 17:14, Sven Neumann wrote: > Hi, > Oh? Actually 1.3 is supposed to read the 1.2 palette and gradient > files directly. Did we break backward compatibility? If so, this should > better be fixed. > Gimp-1.3.20 seems to read the 1.2 palettes and gradients properly, but it complains mightily about having to use the legacy format. These are purely for convenience and to reduce the number of warnings at load time. -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzsHome Page http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery http://trefftzs.topcities.com/ Photo Gallery ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Gradient and Palette conversions
Hi, Jeff Trefftzs <[EMAIL PROTECTED]> writes: > I have just written a couple of little perl scripts to convert existing > gimp-1.2.x palettes and gradients into a form that gimp-1.3.20 finds > acceptable. In the hope that others might find them useful, I have > attached them. Oh? Actually 1.3 is supposed to read the 1.2 palette and gradient files directly. Did we break backward compatibility? If so, this should better be fixed. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Gradient and Palette conversions
Hi All, I have just written a couple of little perl scripts to convert existing gimp-1.2.x palettes and gradients into a form that gimp-1.3.20 finds acceptable. In the hope that others might find them useful, I have attached them. Happy Gimping! -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzsHome Page http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery http://trefftzs.topcities.com/ Photo Gallery #!/bin/env perl # grad2-1.3.pl: convert gimp gradients from old (1.2 format) to # gimp-1.3 format by adding a Name: gradient name line and a .ggr # extension to the output file. # usage: grad2-1.3.pl use strict; use File::Basename; # Make sure the last arg is a target directory my $outdir = $ARGV[$#ARGV]; die "grad2-1.3.pl: last parameter should be a directory.\n" unless (-d $outdir); if (substr($outdir, length($outdir), 1) ne '/') { $outdir .= '/'; } $#ARGV--; # Get the first gradient name my ($fname, $path, $ext) = fileparse($ARGV[0]); print STDERR "$fname\n"; my $outfname = $outdir . $fname . '.ggr'; # .ggr extension print STDERR "Outfname is $outfname\n"; open(GRAD, ">$outfname") or die "Can't open output file\n"; while(<>) { if ($. == 2) { my $gradname = $fname; $gradname =~ s/_/ /g; # convert underscores to spaces print GRAD "Name: $gradname\n"; } print GRAD; next unless (eof); close ARGV; # reset line numbers last unless ($ARGV[0]); close GRAD; ($fname, $path, $ext) = fileparse($ARGV[0]); $outfname = $outdir . $fname . '.ggr'; print STDERR "$fname\n"; print STDERR "Outfilename is $outfname\n"; open(GRAD, ">$outfname") or die "Can't open output file\n"; } close GRAD; #!/bin/env perl # palette2-1.3.pl: convert gimp paletteients from old (1.2 format) to # gimp-1.3 format by adding a Name: palette name line and a .gbr # extension to the output file. # usage: palette2-1.3.pl use strict; use File::Basename; # Make sure the last arg is a target directory my $outdir = $ARGV[$#ARGV]; die "palette2-1.3.pl: last parameter should be a directory.\n" unless (-d $outdir); if (substr($outdir, length($outdir), 1) ne '/') { $outdir .= '/'; } $#ARGV--; # Get the first palette name my ($fname, $path, $ext) = fileparse($ARGV[0]); print STDERR "$fname\n"; my $outfname = $outdir . $fname . '.gpl'; # .gpl extension print STDERR "Outfname is $outfname\n"; open(PALETTE, ">$outfname") or die "Can't open output file\n"; while(<>) { if ($. == 2) { my $palettename = $fname; $palettename =~ s/_/ /g; # convert underscores to spaces print PALETTE "Name: $palettename\n"; } print PALETTE; next unless (eof); close ARGV; # reset line numbers last unless ($ARGV[0]); close PALETTE; ($fname, $path, $ext) = fileparse($ARGV[0]); $outfname = $outdir . $fname . '.gpl'; print STDERR "$fname\n"; print STDERR "Outfilename is $outfname\n"; open(PALETTE, ">$outfname") or die "Can't open output file\n"; } close PALETTE; ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Gradient Bevel Logo Function
Is it possible to change the text color when using functions like the Gradient Bevel (Xtns | Script-Fu | Logos )? I can change the background color, of course, but nothing I try will change the text color. Must I edit the function directly (if that's even possible)? -- Mike Thorn [EMAIL PROTECTED] This email was sent from a Linux computer! ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Gradient to transparent
Hi-- It may be in there, but I do not know the vocabulary. I want to do a gradient with a color on one end and transparent on the other. All the possible things I see do not do what I want. Anyone help? -- Thanks-- Jim Clark ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient
Seth - I expect you're right. I was thinking of scripts, not gradients. Thanks for the clarification. You are welcome to convert the scripts to gimp-perl. Let me know when you're done. -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzsHome Page http://gug.sunsite.dk/gallery.php&artist=68 Gimp Gallery http://members4.clubphoto.com/jeff309574A photo gallery http://www.photos4all.net/jefftzs Another photo gallery ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient
Jeff, I suspect Indira was referring to the results (the gradients). These you place in your ~/.gimp-1.2/gradients/ directory for an individual user, or in your /usr/local/share/gimp/gradients/ directory for system-wide access. (both these are defaults for 1.2 on a unix-like OS - if you installed differently, your directions will vary). Also, would you mind if I converted those scripts into gimp-perl scripts callable from within gimp? They seem pretty useful! Seth Burgess [EMAIL PROTECTED] --- Jeff Trefftzs <[EMAIL PROTECTED]> wrote: > Indira asked - > > > Ok, I will try them out but how and where do I > install them? > > Depends on your system. I'm running Linux, so I > installed them > in my local bin directory: ~/jeff/bin which is in > my search > path. If you have perl installed, then all you need > to do is > run them at a shell prompt. If you're running > Windows you > should ask someone else. > > BTW, if you're not familiar with perl, it's an > interpreted > language good for doing almost anything you can > imagine. And it > is available on Windows systems, too. > > HTH, > > -- > --Jeff > Jeff Trefftzs <[EMAIL PROTECTED]> > http://www.tcsn.net/trefftzs Home Page > http://gug.sunsite.dk/gallery.php&artist=68 Gimp > Gallery > http://members4.clubphoto.com/jeff309574 A photo > gallery > http://www.photos4all.net/jefftzs Another photo > gallery > > > > > > ___ > Gimp-user mailing list > [EMAIL PROTECTED] > http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient
Indira asked - > Ok, I will try them out but how and where do I install them? Depends on your system. I'm running Linux, so I installed them in my local bin directory: ~/jeff/bin which is in my search path. If you have perl installed, then all you need to do is run them at a shell prompt. If you're running Windows you should ask someone else. BTW, if you're not familiar with perl, it's an interpreted language good for doing almost anything you can imagine. And it is available on Windows systems, too. HTH, -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzsHome Page http://gug.sunsite.dk/gallery.php&artist=68 Gimp Gallery http://members4.clubphoto.com/jeff309574A photo gallery http://www.photos4all.net/jefftzs Another photo gallery ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient
> An easier method: > > > I have wondered about this myself in connection with palettes, > > which often have a nicely selected set of colors already > > available. I have built a pair of little perl procs to (1) sort > > a palette by value, hue, saturation, or hsv_value, > > and (2) create a gradient from a palette. In the hope that > > these may answer your need, I have attached them. > > > Caveats: They are NOT documented very well. Consider them > > beta, at best. I have used them successfully myself, but YMMV. > > Particularly on pal2grad.pl, read the code. You can set the > number of steps in the resulting gradient. > > > --Jeff > > Jeff Trefftzs <[EMAIL PROTECTED]> > > http://www.tcsn.net/trefftzs Home Page > > http://gug.sunsite.dk/gallery.php&artist=68 Gimp Gallery > > http://members4.clubphoto.com/jeff309574 A photo gallery > > http://www.photos4all.net/jefftzs Another photo gallery > > > > Ok, I will try them out but how and where do I install them? Thanks [EMAIL PROTECTED] There is nothing good or bad, but thinking makes it so... ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] gradient
Indira asked: > if I have an image and I want to use the colors of that image, how do i > make a custom gradient? First method (long and tedious): Use the gradient editor, picking colors from the image and dropping them into the gradient as described in the GimpUsersManual_2ndEdition.pdf. An easier method: I have wondered about this myself in connection with palettes, which often have a nicely selected set of colors already available. I have built a pair of little perl procs to (1) sort a palette by value, hue, saturation, or hsv_value, and (2) create a gradient from a palette. In the hope that these may answer your need, I have attached them. Caveats: They are NOT documented very well. Consider them beta, at best. I have used them successfully myself, but YMMV. Particularly on pal2grad.pl, read the code. You can set the number of steps in the resulting gradient. -- --Jeff Jeff Trefftzs <[EMAIL PROTECTED]> http://www.tcsn.net/trefftzs Home Page http://gug.sunsite.dk/gallery.php&artist=68 Gimp Gallery http://members4.clubphoto.com/jeff309574 A photo gallery http://www.photos4all.net/jefftzs Another photo gallery #!/usr/local/bin/perl # pal2grad.pl - convert a GIMP palette to a gradient. use strict; use vars qw($opt_r $opt_b $opt_n); use Getopt::Std; # parse command line arguments getopts('rbn:'); if ($ARGV < 0) { die "$ARGV[0]: Can't find a file to process\n"; } my @PALETTE = (); my @GRADIENT = (); while (<>) { if(/^[^0-9 ]/) {# skip comments and headers next; } push @PALETTE, $_; } my $STEPS = $#PALETTE; # how many entries in the palette my $count = (defined $opt_n) ? $opt_n : $STEPS; my $width = 1.0/$count; # width of one segment my $demi = $width/2;# distance to midpoint my @oldcolor = split(/\s/, $PALETTE[0], 3); my $alpha = 1.0; for (my $i = 1; $i <= $count; $i++) { my $index = $i * ($STEPS/$count); my ($red, $green, $blue) = split(/\s/, $PALETTE[$index], 3); #printf stderr "red=$red, green=$green, blue=$blue\n"; my ($start, $middle, $end) = (($i -1) * $width, $i * $width - $demi, $i * $width); if (defined $opt_r) { $start = 1.0 - $end; $middle = 1.0 - $middle; $end = 1.0 - (($i - 1) * $width); } my $grad_entry = sprintf ("%f %f %f %f %f %f %f %f %f %f %f %d %d\n", $start, $middle, $end, $oldcolor[0]/255, # starting red $oldcolor[1]/255, # starting green $oldcolor[2]/255, # starting blue $alpha, $red/255, # ending red $green/255, # ending green $blue/255, # ending blue $alpha, # Opacity - constant for now 0, # linear blend 0 # rgb coloring ); if (!(defined $opt_r)) { push @GRADIENT, $grad_entry; } else { unshift @GRADIENT, $grad_entry; } @oldcolor = ($red, $green, $blue); } print "GIMP Gradient\n"; printf "%d\n", $count; print @GRADIENT;
[Gimp-user] gradient
if I have an image and I want to use the colors of that image, how do i make a custom gradient? Thanks [EMAIL PROTECTED] There is nothing good or bad, but thinking makes it so... ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user