see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann
2000-03-28 13:30:29 +00:00
parent 99411b4195
commit 8c46f10171
64 changed files with 505 additions and 218 deletions

View File

@ -30,6 +30,10 @@ Revision history for Gimp-Perl extension.
- do not register menus when Gtk is needed for dialogs. - do not register menus when Gtk is needed for dialogs.
- updated examples/burst. - updated examples/burst.
- fixed various old-syntax leftovers in Gimp::Util. - fixed various old-syntax leftovers in Gimp::Util.
- modernized examples/example-fu.
- added examples/dust.
- updated po/Makefile.PL to find the scripts again.
- applied edit_fill change. Boy we need default agruments soon!
1.19 Thu Jan 6 00:21:58 CET 2000 1.19 Thu Jan 6 00:21:58 CET 2000
- used N_ to mark all the menu paths, since gimp now tries to - used N_ to mark all the menu paths, since gimp now tries to

View File

@ -128,6 +128,7 @@ examples/roundsel
examples/visual examples/visual
examples/billboard examples/billboard
examples/blended2 examples/blended2
examples/dust
pxgettext pxgettext
po/ChangeLog po/ChangeLog
po/Makefile.PL po/Makefile.PL

View File

@ -43,7 +43,7 @@ if ($ARGV[0] ne "--writemakefile") {
repdup centerguide stampify goldenmean triangle mirrorsplit repdup centerguide stampify goldenmean triangle mirrorsplit
layerfuncs randomart1 glowing_steel frame_reshuffle frame_filter layerfuncs randomart1 glowing_steel frame_reshuffle frame_filter
logulator guide_remove guides_to_selection burst logulator guide_remove guides_to_selection burst
layerfuncs bricks miff layerfuncs bricks miff dust
); );
@pdl_pins = @pdl_pins =
qw( qw(

View File

@ -16,6 +16,7 @@ use base qw(DynaLoader);
use Socket; # IO::Socket is _really_ slow, so don't use it! use Socket; # IO::Socket is _really_ slow, so don't use it!
use Gimp ('croak','__'); use Gimp ('croak','__');
use Fcntl qw(F_SETFD);
require DynaLoader; require DynaLoader;
@ -158,6 +159,7 @@ sub start_server {
return $server_fh; return $server_fh;
} elsif ($gimp_pid == 0) { } elsif ($gimp_pid == 0) {
close $server_fh; close $server_fh;
fcntl $gimp_fh, F_SETFD, 0;
delete $ENV{GIMP_HOST}; delete $ENV{GIMP_HOST};
unless ($Gimp::verbose) { unless ($Gimp::verbose) {
open STDIN,"</dev/null"; open STDIN,"</dev/null";

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# you can enable unix sockets, tcp sockets, or both (or neither...) # you can enable unix sockets, tcp sockets, or both (or neither...)
@ -167,7 +170,8 @@ sub extension_perl_server {
if ($run_mode == &Gimp::RUN_NONINTERACTIVE) { if ($run_mode == &Gimp::RUN_NONINTERACTIVE) {
if ($ps_flags & &Gimp::_PS_FLAG_BATCH) { if ($ps_flags & &Gimp::_PS_FLAG_BATCH) {
my($fh) = local *FH; my($fh) = local *FH;
open $fh,"+<&$extra" or die __"unable to open Gimp::Net communications socket\n"; print "CSOCKET would be $extra\n";
open $fh,"+<&$extra" or die __"unable to open Gimp::Net communications socket: $!\n";
select $fh; $|=1; select STDOUT; select $fh; $|=1; select STDOUT;
reply $fh,"PERL-SERVER",$Gimp::_PROT_VERSION; reply $fh,"PERL-SERVER",$Gimp::_PROT_VERSION;
while(!$server_quit and !eof($fh)) { while(!$server_quit and !eof($fh)) {

View File

@ -26,25 +26,17 @@ API generalization
bugs bugs
* .pot file -> add to dist. * .pot file -> add to dist.
* damnit libintl crazy shit * damnit libintl crazy shit
[DONE] * alow gimp_selection_shrink with a zero argument.
* font_text with negative size? bug report #5523 * font_text with negative size? bug report #5523
* gimp-perl list archives.. where and add this to the gimp.html page! * gimp-perl list archives.. where and add this to the gimp.html page!
* g_direct_equal and glin hash, kill in favour of way nicer perl hashes. * g_direct_equal and glin hash, kill in favour of way nicer perl hashes.
* ping-funktion f<>r JENS. * ping-funktion f<>r JENS.
[DONE] * never grayed out = "undef" imagetypes!!!
[DONE] * gimp_layer_set_name(4, "(null)") = gimp: fatal error: sigsegv caught
[KILL] * ftp://metalab.unc.edu/pub/Linux/X11/gtkbuffet/libs/gtkxmhtml/ into INSTALL
* gtview_log (perlcc & helpfenster) erste zeile anzeigen + scrollbar * gtview_log (perlcc & helpfenster) erste zeile anzeigen + scrollbar
[DONE] * make test should not be run without DISPLAY
* document on_xxx functions and register_callback * document on_xxx functions and register_callback
* fix Gimp::Feature::missing => on_query-dir! * fix Gimp::Feature::missing => on_query-dir!
[DONE] * update logulator
* on-query => remove gimp::fu parasite(?) * on-query => remove gimp::fu parasite(?)
[????] * bricks requires disable for pattern(?) [????] * bricks requires disable for pattern(?)
[KILL] * better default argument-handlign via a "massage_args" callback from Gimp/UI/interact?
* installation & Feature system (?) * installation & Feature system (?)
* map_to_gradient does not work on GRAYA thingies. Argh. * map_to_gradient does not work on GRAYA thingies. Argh.
[KILL] * scroll behaviour, use clist instead of list?
* document Gimp::PDL and rect2, ...2 functions! * document Gimp::PDL and rect2, ...2 functions!
* Kommandozeilenmodus(!). (???) * Kommandozeilenmodus(!). (???)
* gimp-piddle must be written back automatically on destroy, if changed * gimp-piddle must be written back automatically on destroy, if changed
@ -53,11 +45,11 @@ bugs
important issues important issues
* gimp_default_display -> undef when not available.
* find_next_guide is a lousy interface. => just do num_guides * find_next_guide is a lousy interface. => just do num_guides
* constant names (RADIO) automatically into help strings! * constant names (RADIO) automatically into help strings!
* migrate BOOT: into INIT() (forgot why but important for B) * migrate BOOT: into INIT() (forgot why but important for B)
* gimp_progress_done, gimp_progress_close * gimp_progress_done, gimp_progress_close
[KILL] * maybe implement --enable-perl=runtime-only?
* gimp_default_display (...) for libgimp * gimp_default_display (...) for libgimp
* Gimp::Module for modules (!) * Gimp::Module for modules (!)
* gimp for dummies (you don't understand this, harharhar!) * gimp for dummies (you don't understand this, harharhar!)
@ -65,17 +57,12 @@ important issues
* implement CALLBACKS via the Perl-Server * implement CALLBACKS via the Perl-Server
* PF_COORDS (just as Light Effects/FlareFX) * PF_COORDS (just as Light Effects/FlareFX)
* PF_PREVIEW(!) * PF_PREVIEW(!)
[KILL] * change set_usize to something else..
* Gimp::IO (?) * Gimp::IO (?)
* install scripts in share/ * install scripts in share/
[KILL] * gimp->object_id, drawable_object_id remove!
* vamp up homepage * vamp up homepage
* Gimp::ping * Gimp::ping
* allow plug-ins to register with only a drawable argument(!) * allow plug-ins to register with only a drawable argument(!)
* gradient button * gradient button
[KILL] * weighted movement in drawing tools
[KILL] * --function localfunc to select one of the registered scripts
[KILL] * create working progress when Net and $verbose
* default parameters at end(!) * default parameters at end(!)
* try to deduce default parameters * try to deduce default parameters

View File

@ -51,7 +51,7 @@ sub Create_Image {
# Do the fun stuff with the text. # Do the fun stuff with the text.
gimp_palette_set_background($Text_Colour); gimp_palette_set_background($Text_Colour);
gimp_layer_set_preserve_trans($Text_Layer, TRUE); gimp_layer_set_preserve_trans($Text_Layer, TRUE);
#gimp_edit_fill($Image, $Text_Layer); #gimp_edit_fill($Image, $Text_Layer, BG_IMAGE_FILL);
# Now figure out the size of $Text_Layer. # Now figure out the size of $Text_Layer.
$Width = gimp_drawable_width($Text_Layer); $Width = gimp_drawable_width($Text_Layer);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
#BEGIN {$^W=1}; #BEGIN {$^W=1};

View File

@ -83,7 +83,7 @@ sub alpha2col {
$target_layer->set_active_layer; $target_layer->set_active_layer;
$img->selection_all; $img->selection_all;
$target_layer->edit_fill; $target_layer->edit_fill(BG_IMAGE_FILL);
$img->selection_none; $img->selection_none;
$foreground = gimp_image_merge_visible_layers($img,0); $foreground = gimp_image_merge_visible_layers($img,0);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# A plug-in for GIMP which animates a series of layers as if # A plug-in for GIMP which animates a series of layers as if
# they were animation cells (different from the normal gimp animation, # they were animation cells (different from the normal gimp animation,

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# pcg@goof.com # pcg@goof.com
# a simpleminded uncompressed avi load/save plug-in # a simpleminded uncompressed avi load/save plug-in

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -36,7 +39,7 @@ sub my_innerbevel {
$text2_lay=$text1_lay->copy(1); $text2_lay=$text1_lay->copy(1);
$img->add_layer($text2_lay, -1); $img->add_layer($text2_lay, -1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
$text2_lay->edit_fill; $text2_lay->edit_fill(BG_IMAGE_FILL);
$text2_lay->set_preserve_trans(0); $text2_lay->set_preserve_trans(0);
$text1_lay->set_preserve_trans(0); $text1_lay->set_preserve_trans(0);
plug_in_gauss_rle ($text2_lay, 6, 1, 1); plug_in_gauss_rle ($text2_lay, 6, 1, 1);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Blow In/Out # Blow In/Out
# John Pitney # John Pitney

View File

@ -78,7 +78,7 @@ register "border_average",
my $layer = new Layer ($image, width $image, height $image, RGB_IMAGE, "bordercolour", 100, NORMAL_MODE); my $layer = new Layer ($image, width $image, height $image, RGB_IMAGE, "bordercolour", 100, NORMAL_MODE);
add_layer $image $layer,0; add_layer $image $layer,0;
Palette->set_background([$r,$g,$b]); Palette->set_background([$r,$g,$b]);
$layer->edit_fill; $layer->edit_fill(BG_IMAGE_FILL)
Gimp->message("Added layer with border colour ($r,$g,$b) on top"); Gimp->message("Added layer with border colour ($r,$g,$b) on top");
} }

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# [10/27/1999] v0.0.1 First version. # [10/27/1999] v0.0.1 First version.

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
# #

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# pcg@goof.com # pcg@goof.com
use Gimp; use Gimp;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# pcg@goof.com # pcg@goof.com
# this is not totally serious... # this is not totally serious...

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use strict 'subs'; use strict 'subs';
use Gimp; use Gimp;

138
plug-ins/perl/examples/dust Executable file
View File

@ -0,0 +1,138 @@
#!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp;
use Gimp::Fu;
use Gimp::Util;
# this is silly, sorry that I am too dumb to come up with niftier functions :(
# btw, this should generate something between 1/f and 1/f<> noise.
{
my @weight = (1/8, 1/4, 1/2, 1);
my @dice;
my $total = 0;
my $tweight = 0;
my $n = 0;
my $seed;
sub gen_rand() {
my ($prevrand, $newrand, $k);
$n++;
for (0..$#weight) {
if ($n & (1<<$_)) {
$prevrand = $dice[$_];
$newrand = rand() * $weight[$_];
$dice[$_] = $newrand;
$total += $newrand - $prevrand;
}
}
$total / $tweight;
}
sub set_seed($) {
if ($_[0]) {
srand $_[0];
} else {
srand;
}
$total = 0;
$tweight = 0;
for (0..$#weight) {
$dice[$_] = rand()*$weight[$_];
$total += $dice[$_];
$tweight += $weight[$_];
}
}
}
# the next line just shows a graph of the "random" numbers.
#set_seed 0; use PDL; use PDL::Graphics::PGPLOT; line(pdl(float,map gen_rand, 1..500));
register "dust",
"",
"",
"Marc Lehmann",
"Marc Lehmann <pcg\@goof.com",
"0.1",
N_"<Image>/Filters/Render/Add Dust...",
"*",
# Eingabeparameter
# Typ Name Beschreibung Wert
[
[PF_FLOAT, 'density', 'dust density in dust/pixel', 0.0001],
[PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0],
[PF_SPINNER, 'length', 'the average dust corn length', 50, [1,300]],
],
sub { # Perl-Code
# Die Parameter werden ganz "normal" <20>bergeben:
my ($image, $layer, $density, $seed, $len) = @_;
$len *= 0.75;
set_seed $seed;
my ($w, $h) = ($image->width, $image->height);
$image->undo_push_group_start;
my $state = Gimp::Util::get_state();
Palette->set_foreground("white");
Brushes->set_brush("Circle (01)");
Brushes->set_opacity(50);
Brushes->set_spacing(100);
Brushes->set_paint_mode(NORMAL_MODE);
if (1) {
$layer = $image->add_new_layer (0, TRANS_IMAGE_FILL, 1);
$layer->set_mode(DIFFERENCE_MODE);
}
for (1..($w*$h*$density)) {
my ($x, $y) = (rand $w, rand $h);
my $l = int($len + rand $len);
my @c;
my $b = 0;
for (1..$l) {
push @c, $b += 5*(gen_rand-0.5);
push @c, $b += 5*(gen_rand-0.5);
}
$layer->paintbrush_default([map { $x+$c[$_], $y+$c[$_+$l] } 0..$l-1]);
}
Gimp::Util::set_state($state);
$image->undo_push_group_end;
();
};
#register "gen_rand_1f",
# "generate 1/f noise",
# "Generate approximate 1/f (white) noise in the range [0,1[",
# "Marc Lehmann",
# "Marc Lehmann <pcg\@goof.com",
# "0.1",
# "<None>",
# undef,
# # Eingabeparameter
# # Typ Name Beschreibung Wert
# [
# [PF_FLOAT, 'count', 'the number of values', 1],
# [PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0],
# ],
# [
# [&Gimp::PARAM_FLOATARRAY,'noise','the requested number of 1/f noise values'],
# ],
# sub {
# my ($count, $seed) = @_;
# set_seed $seed;
# [map gen_rand_1f, 1..$count];
# };
exit main;

View File

@ -9,8 +9,8 @@ register "gimp_fu_example_script", # fill in a function name
"scripts. Always remember to put a long". "scripts. Always remember to put a long".
"help message here!", "help message here!",
"Marc Lehmann <pcg\@goof.com>", # don't forget your name (author) "Marc Lehmann <pcg\@goof.com>", # don't forget your name (author)
"(c) 1998, 1999 Marc Lehmann", # and your copyright! "(c)1998,1999,2000 Marc Lehmann", # and your copyright!
"19990316", # the date this script was written "20000321", # the date this script was written (YYYYMMDD)
N_"<Toolbox>/Xtns/Gimp::Fu Example", # the menu path N_"<Toolbox>/Xtns/Gimp::Fu Example", # the menu path
"RGB*, GRAYA", # image types to accept (RGB, RGAB amnd GRAYA) "RGB*, GRAYA", # image types to accept (RGB, RGAB amnd GRAYA)
[ [
@ -34,19 +34,19 @@ register "gimp_fu_example_script", # fill in a function name
sub { sub {
# now do sth. useful with the garbage we got ;) # now do sth. useful with the garbage we got ;)
my($width,$height,$text,$font,$fg,$bg,$ignore,$brush,$pattern,$gradient)=@_; my($width,$height,$text,$brd1,$brd2,$font,$fg,$bg,$ignore,$xtraimg,$xtradrw,$effecttype,$brush,$pattern,$gradient)=@_;
# set tracing # set tracing, disable this to get rid of the debugging output
Gimp::set_trace(TRACE_ALL); Gimp::set_trace(TRACE_CALL);
my $img=new Image($width,$height,RGB); my $img = new Image ($width, $height, RGB);
# put an undo group around any modifications, so that # put an undo group around any modifications, so that
# they can be undone in one step. The eval shields against # they can be undone in one step.
# gimp-1.0, which does not have this function. $img->undo_push_group_start;
eval { $img->undo_push_group_start };
my $l=new Layer($img,$width,$height,RGB,"Background",100,NORMAL_MODE); # the __ before the string in the next line indicates text that must be translated
my $l = new Layer ($img, $width, $height, RGB, __"Background", 100, NORMAL_MODE);
$l->add_layer(0); $l->add_layer(0);
# now a few syntax examples # now a few syntax examples
@ -55,13 +55,12 @@ register "gimp_fu_example_script", # fill in a function name
Palette->set_background($bg) unless $ignore; Palette->set_background($bg) unless $ignore;
fill $l BG_IMAGE_FILL; fill $l BG_IMAGE_FILL;
$text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, xlfd_size($font), $font);
$text_layer=$img->text_fontname(-1,10,10,$text,5,1,xlfd_size($font),$font); Palette->set_foreground("green");
gimp_palette_set_foreground("green");
# close the undo push group # close the undo push group
eval { $img->undo_push_group_end }; $img->undo_push_group_end;
$img; # return the image, or an empty list, i.e. () $img; # return the image, or an empty list, i.e. ()
}; };

View File

@ -22,8 +22,8 @@ Gimp::on_net {
for $i (0..255) { for $i (0..255) {
Palette->set_background([$i,255-$i,$i]); Palette->set_background([$i,255-$i,$i]);
$bg->edit_fill; $bg->edit_fill(BG_IMAGE_FILL);
Display->displays_flush (); Display->displays_flush();
} }
# Gimp::Net::server_quit; # kill the gimp-perl-server-extension (ugly name) # Gimp::Net::server_quit; # kill the gimp-perl-server-extension (ugly name)
}; };

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
# This is adrian and xachs idea - take a rectangluar selection, and select # This is adrian and xachs idea - take a rectangluar selection, and select

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# Font Table plugin for The Gimp # Font Table plugin for The Gimp
# #

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp 1.095; use Gimp 1.095;
use Gimp::Fu; use Gimp::Fu;

View File

@ -237,12 +237,12 @@ sub decoration_drop_shadow {
# why is the selection cleared? # why is the selection cleared?
$tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0); $tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0);
$tiled_img->edit_fill($tiled_drw_msk); $tiled_img->edit_fill($tiled_drw_msk, BG_IMAGE_FILL);
# why is the selection cleared? # why is the selection cleared?
$tiled_img->rect_select($xpos+$shadow_xoffs, $tiled_img->rect_select($xpos+$shadow_xoffs,
$ypos+$shadow_yoffs, $w, $h, 0, 0, 0); $ypos+$shadow_yoffs, $w, $h, 0, 0, 0);
$tiled_img->edit_fill($tiled_shadow_msk); $tiled_img->edit_fill($tiled_shadow_msk, BG_IMAGE_FILL);
$tiled_img->selection_none(); $tiled_img->selection_none();
@ -316,12 +316,12 @@ sub decoration_sunken_windows {
$bw = 3; $bw = 3;
$tiled_img->rect_select($xpos-$bw, $tiled_img->rect_select($xpos-$bw,
$ypos-$bw, $w+2*$bw, $h+2*$bw, 0, 0, 0); $ypos-$bw, $w+2*$bw, $h+2*$bw, 0, 0, 0);
$tiled_img->edit_fill($tiled_punch_stencil); $tiled_img->edit_fill($tiled_punch_stencil, BG_IMAGE_FILL);
# why is the selection cleared? # why is the selection cleared?
$tiled_img->selection_none(); $tiled_img->selection_none();
$tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0); $tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0);
$tiled_img->edit_fill($tiled_punch_mask); $tiled_img->edit_fill($tiled_punch_mask, BG_IMAGE_FILL);
$tiled_img->selection_none(); $tiled_img->selection_none();
} }

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# A plug-in for GIMP for producing logos and other such nifty things # A plug-in for GIMP for producing logos and other such nifty things
# which appear to be made of steel and floating over a glowing cloud. # which appear to be made of steel and floating over a glowing cloud.

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -21,7 +24,7 @@ sub goldenmean {
gimp_image_add_layer($layer, -1); gimp_image_add_layer($layer, -1);
gimp_palette_set_background([255, 255, 255]); gimp_palette_set_background([255, 255, 255]);
$layer->gimp_edit_fill; $layer->gimp_edit_fill(BG_IMAGE_FILL);
return $img; return $img;
} }

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# 11/7/99 <brendy@swipnet.se> # 11/7/99 <brendy@swipnet.se>

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> (original release) # <sjburges@gimp.org> (original release)
# #

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp; use Gimp;
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# A photo-tiling pluggin. Take an image, and tile it (much like the # A photo-tiling pluggin. Take an image, and tile it (much like the
# mosaic operation, only using other images). # mosaic operation, only using other images).

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Effect taken from http://tigert.gimp.org/gimp/tutorials/beveled_text/ # Effect taken from http://tigert.gimp.org/gimp/tutorials/beveled_text/
# perl-ified by Seth Burgess <sjburges@gimp.org> # perl-ified by Seth Burgess <sjburges@gimp.org>
@ -76,7 +79,7 @@ $img->add_layer($layer2, 0);
$layer2->set_preserve_trans(1); $layer2->set_preserve_trans(1);
$img->selection_all; $img->selection_all;
gimp_palette_set_background([255,255,255]); gimp_palette_set_background([255,255,255]);
$layer2->edit_fill; $layer2->edit_fill(BG_IMAGE_FILL);
# -- step 6 -- # -- step 6 --
$layer2->set_preserve_trans(0); $layer2->set_preserve_trans(0);
$layer2->gauss_rle(6,1,1); # Defaults would be cool here too :) $layer2->gauss_rle(6,1,1); # Defaults would be cool here too :)

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl -w #!/usr/app/bin/perl -w
eval 'exec /usr/app/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
use Gimp; use Gimp;
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -147,7 +150,7 @@ sub script_fu_3d_outline_logo {
gimp_image_resize ($img, $width, $height, 0, 0); gimp_image_resize ($img, $width, $height, 0, 0);
gimp_image_add_layer ($img, $pattern, 1); gimp_image_add_layer ($img, $pattern, 1);
gimp_image_add_layer ($img, $bg_layer, 2); gimp_image_add_layer ($img, $bg_layer, 2);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($pattern); gimp_edit_clear ($pattern);
gimp_layer_set_preserve_trans ($text_layer, 0); gimp_layer_set_preserve_trans ($text_layer, 0);
plug_in_gauss_iir ($img, $text_layer, $outline_blur_radius, 1, 1); plug_in_gauss_iir ($img, $text_layer, $outline_blur_radius, 1, 1);
@ -222,13 +225,13 @@ sub script_fu_alien_glow_logo {
gimp_image_add_layer ($img, $glow_layer, 1); gimp_image_add_layer ($img, $glow_layer, 1);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($glow_layer); gimp_edit_clear ($glow_layer);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_grow ($img, $grow); gimp_selection_grow ($img, $grow);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_palette_set_background ($glow_color); gimp_palette_set_background ($glow_color);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_palette_set_foreground ([79, 79, 79]); gimp_palette_set_foreground ([79, 79, 79]);
@ -274,14 +277,14 @@ sub script_fu_basic1_logo {
gimp_image_add_layer ($img, $bg_layer, 2); gimp_image_add_layer ($img, $bg_layer, 2);
gimp_palette_set_background ($text_color); gimp_palette_set_background ($text_color);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($shadow_layer); gimp_edit_clear ($shadow_layer);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_feather ($img, 7.5); gimp_selection_feather ($img, 7.5);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height); gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height);
@ -344,17 +347,17 @@ sub script_fu_basic2_logo {
gimp_image_add_layer ($img, $highlight_layer, 1); gimp_image_add_layer ($img, $highlight_layer, 1);
gimp_palette_set_background ($text_color); gimp_palette_set_background ($text_color);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_edit_clear ($shadow_layer); gimp_edit_clear ($shadow_layer);
gimp_palette_set_background (color_highlight ($text_color)); gimp_palette_set_background (color_highlight ($text_color));
gimp_layer_set_preserve_trans ($highlight_layer, 1); gimp_layer_set_preserve_trans ($highlight_layer, 1);
gimp_edit_fill ($highlight_layer); gimp_edit_fill ($highlight_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_drawable_fill ($bg_layer, BG_IMAGE_FILL); gimp_drawable_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_feather ($img, 7.5); gimp_selection_feather ($img, 7.5);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height); gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height);
@ -423,21 +426,21 @@ sub script_fu_blended_logo {
gimp_edit_clear ($drop_shadow_layer); gimp_edit_clear ($drop_shadow_layer);
gimp_palette_set_background ($text_color); gimp_palette_set_background ($text_color);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL); gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2); gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask); gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($tsl_layer_mask); gimp_edit_fill ($tsl_layer_mask, BG_IMAGE_FILL);
gimp_selection_feather ($img, $f_size); gimp_selection_feather ($img, $f_size);
gimp_palette_set_background ([63, 63, 63]); gimp_palette_set_background ([63, 63, 63]);
gimp_edit_fill ($drop_shadow_layer); gimp_edit_fill ($drop_shadow_layer, BG_IMAGE_FILL);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($text_shadow_layer); gimp_edit_fill ($text_shadow_layer, BG_IMAGE_FILL);
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
gimp_blend ($text_shadow_layer, FG_BG_RGB, NORMAL_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1); gimp_blend ($text_shadow_layer, FG_BG_RGB, NORMAL_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
@ -451,7 +454,7 @@ sub script_fu_blended_logo {
gimp_selection_layer_alpha ($blend_layer); gimp_selection_layer_alpha ($blend_layer);
gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask); gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($dsl_layer_mask); gimp_edit_fill ($dsl_layer_mask, BG_IMAGE_FILL);
gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_name ($text_layer, $text); gimp_layer_set_name ($text_layer, $text);
@ -498,18 +501,18 @@ sub script_fu_bovinated_logo {
gimp_image_add_layer ($img, $bg_layer, 1); gimp_image_add_layer ($img, $bg_layer, 1);
gimp_image_add_layer ($img, $blur_layer, 1); gimp_image_add_layer ($img, $blur_layer, 1);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($blur_layer, 1); gimp_layer_set_preserve_trans ($blur_layer, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($blur_layer); gimp_edit_fill ($blur_layer, BG_IMAGE_FILL);
gimp_edit_clear ($blur_layer); gimp_edit_clear ($blur_layer);
gimp_palette_set_background ([191, 191, 191]); gimp_palette_set_background ([191, 191, 191]);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($blur_layer, 0); gimp_layer_set_preserve_trans ($blur_layer, 0);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_edit_fill ($blur_layer); gimp_edit_fill ($blur_layer, BG_IMAGE_FILL);
plug_in_gauss_rle ($img, $blur_layer, 5.0, 1, 1); plug_in_gauss_rle ($img, $blur_layer, 5.0, 1, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
@ -608,9 +611,9 @@ sub script_fu_carved_logo {
gimp_image_undo_disable ($img); gimp_image_undo_disable ($img);
gimp_layer_set_preserve_trans ($mask_layer, 1); gimp_layer_set_preserve_trans ($mask_layer, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($mask_layer); gimp_edit_fill ($mask_layer, BG_IMAGE_FILL);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($mask); gimp_edit_fill ($mask, BG_IMAGE_FILL);
plug_in_tile ($img, $layer1, $width, $height, 0); plug_in_tile ($img, $layer1, $width, $height, 0);
gimp_image_add_channel ($img, $mask, 0); gimp_image_add_channel ($img, $mask, 0);
gimp_edit_copy ($mask_layer); gimp_edit_copy ($mask_layer);
@ -634,9 +637,9 @@ sub script_fu_carved_logo {
gimp_palette_set_background ([180, 180, 180]); gimp_palette_set_background ([180, 180, 180]);
gimp_selection_load ($mask_fat); gimp_selection_load ($mask_fat);
gimp_selection_invert ($img); gimp_selection_invert ($img);
gimp_edit_fill ($mask_emboss); gimp_edit_fill ($mask_emboss, BG_IMAGE_FILL);
gimp_selection_load ($mask); gimp_selection_load ($mask);
gimp_edit_fill ($mask_emboss); gimp_edit_fill ($mask_emboss, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
$mask_highlight = gimp_channel_copy ($mask_emboss); $mask_highlight = gimp_channel_copy ($mask_emboss);
gimp_image_add_channel ($img, $mask_highlight, 0); gimp_image_add_channel ($img, $mask_highlight, 0);
@ -662,14 +665,14 @@ sub script_fu_carved_logo {
gimp_image_add_layer_mask ($img, $cast_shadow_layer, $csl_mask); gimp_image_add_layer_mask ($img, $cast_shadow_layer, $csl_mask);
gimp_selection_load ($mask); gimp_selection_load ($mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($csl_mask); gimp_edit_fill ($csl_mask, BG_IMAGE_FILL);
$inset_layer = gimp_layer_copy ($layer1, 1); $inset_layer = gimp_layer_copy ($layer1, 1);
gimp_image_add_layer ($img, $inset_layer, 1); gimp_image_add_layer ($img, $inset_layer, 1);
$il_mask = gimp_layer_create_mask ($inset_layer, BLACK_MASK); $il_mask = gimp_layer_create_mask ($inset_layer, BLACK_MASK);
gimp_image_add_layer_mask ($img, $inset_layer, $il_mask); gimp_image_add_layer_mask ($img, $inset_layer, $il_mask);
gimp_selection_load ($mask); gimp_selection_load ($mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($il_mask); gimp_edit_fill ($il_mask, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_levels ($inset_layer, 0, 0, 255, $inset_gamma, 0, 255); gimp_levels ($inset_layer, 0, 0, 255, $inset_gamma, 0, 255);
gimp_image_remove_channel ($img, $mask); gimp_image_remove_channel ($img, $mask);
@ -721,10 +724,10 @@ sub script_fu_chalk_logo {
gimp_image_resize ($img, $width, $height, 0, 0); gimp_image_resize ($img, $width, $height, 0, 0);
gimp_image_add_layer ($img, $bg_layer, 1); gimp_image_add_layer ($img, $bg_layer, 1);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($chalk_color); gimp_palette_set_background ($chalk_color);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_gauss_rle ($img, $text_layer, 2.0, 1, 1); plug_in_gauss_rle ($img, $text_layer, 2.0, 1, 1);
plug_in_spread ($img, $text_layer, 5.0, 5.0); plug_in_spread ($img, $text_layer, 5.0, 5.0);
@ -782,13 +785,13 @@ sub script_fu_logo_chip_away {
if ($bg_fill) { if ($bg_fill) {
gimp_bucket_fill ($bg_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1); gimp_bucket_fill ($bg_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1);
} else { } else {
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
} }
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_clear ($bump_layer); gimp_edit_clear ($bump_layer);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_edit_fill ($bump_layer); gimp_edit_fill ($bump_layer, BG_IMAGE_FILL);
gimp_bucket_fill ($text_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1); gimp_bucket_fill ($text_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_image_add_layer ($img, $bump_layer, 1); gimp_image_add_layer ($img, $bump_layer, 1);
@ -809,7 +812,7 @@ sub script_fu_logo_chip_away {
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_gauss_rle ($img, $shadow_layer, 5, 1, 1); plug_in_gauss_rle ($img, $shadow_layer, 5, 1, 1);
gimp_image_add_layer ($img, $shadow_layer, 1); gimp_image_add_layer ($img, $shadow_layer, 1);
@ -883,21 +886,21 @@ sub script_fu_chrome_logo {
gimp_image_add_layer ($img, $layer1, 1); gimp_image_add_layer ($img, $layer1, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_edit_fill ($layer1); gimp_edit_fill ($layer1, BG_IMAGE_FILL);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_edit_clear ($shadow); gimp_edit_clear ($shadow);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_layer_set_visible ($text_layer, 0); gimp_layer_set_visible ($text_layer, 0);
gimp_layer_set_visible ($shadow, 0); gimp_layer_set_visible ($shadow, 0);
gimp_layer_set_visible ($background, 0); gimp_layer_set_visible ($background, 0);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($layer1); gimp_edit_fill ($layer1, BG_IMAGE_FILL);
gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_translate ($img, $offx1, $offy1);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
$layer1 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); $layer1 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE);
gimp_invert ($layer1); gimp_invert ($layer1);
@ -905,13 +908,13 @@ sub script_fu_chrome_logo {
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_edit_fill ($layer_mask); gimp_edit_fill ($layer_mask, BG_IMAGE_FILL);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_translate ($img, $offx1, $offy1);
gimp_edit_fill ($shadow); gimp_edit_fill ($shadow, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($background); gimp_edit_fill ($background, BG_IMAGE_FILL);
gimp_image_remove_layer ($img, $text_layer); gimp_image_remove_layer ($img, $text_layer);
gimp_layer_set_visible ($shadow, 1); gimp_layer_set_visible ($shadow, 1);
gimp_layer_set_visible ($background, 1); gimp_layer_set_visible ($background, 1);
@ -960,12 +963,12 @@ sub script_fu_comic_logo {
gimp_image_add_layer ($img, $black_layer, 1); gimp_image_add_layer ($img, $black_layer, 1);
gimp_layer_set_name ($black_layer, "Black"); gimp_layer_set_name ($black_layer, "Black");
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($white_layer, 1); gimp_layer_set_preserve_trans ($white_layer, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($white_layer); gimp_edit_fill ($white_layer, BG_IMAGE_FILL);
gimp_layer_set_preserve_trans ($white_layer, 0); gimp_layer_set_preserve_trans ($white_layer, 0);
plug_in_spread ($img, $white_layer, 3 * $ol_width, 3 * $ol_width); plug_in_spread ($img, $white_layer, 3 * $ol_width, 3 * $ol_width);
plug_in_gauss_rle ($img, $white_layer, 2 * $ol_width, 1, 1); plug_in_gauss_rle ($img, $white_layer, 2 * $ol_width, 1, 1);
@ -974,7 +977,7 @@ sub script_fu_comic_logo {
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_layer_set_preserve_trans ($black_layer, 1); gimp_layer_set_preserve_trans ($black_layer, 1);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($black_layer); gimp_edit_fill ($black_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($black_layer, 0); gimp_layer_set_preserve_trans ($black_layer, 0);
plug_in_gauss_rle ($img, $black_layer, $ol_width, 1, 1); plug_in_gauss_rle ($img, $black_layer, $ol_width, 1, 1);
@ -1045,10 +1048,10 @@ sub script_fu_cool_metal_logo {
gimp_image_add_layer ($img, $shadow_layer, 1); gimp_image_add_layer ($img, $shadow_layer, 1);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($reflect_layer); gimp_edit_clear ($reflect_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
if ($seascape == 1) { if ($seascape == 1) {
gimp_gradients_set_active ("Horizon_2"); gimp_gradients_set_active ("Horizon_2");
} else { } else {
@ -1069,7 +1072,7 @@ sub script_fu_cool_metal_logo {
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_invert ($img); gimp_selection_invert ($img);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($channel); gimp_edit_fill ($channel, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_bump_map ($img, $text_layer, $channel, 135, 45, $depth, 0, 0, 0, 0, 0, 0, 0); plug_in_bump_map ($img, $text_layer, $channel, 135, 45, $depth, 0, 0, 0, 0, 0, 0, 0);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
@ -1250,16 +1253,16 @@ sub script_fu_crystal_logo {
gimp_image_add_layer ($img, $layer2, 0); gimp_image_add_layer ($img, $layer2, 0);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_layer_set_visible ($text_layer, 0); gimp_layer_set_visible ($text_layer, 0);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_translate ($img, $offx1, $offy1);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
$layer2 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); $layer2 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE);
gimp_invert ($layer2); gimp_invert ($layer2);
@ -1275,7 +1278,7 @@ sub script_fu_crystal_logo {
gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_image_add_layer_mask ($img, $layer1, $layer_mask);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($layer_mask); gimp_edit_fill ($layer_mask, BG_IMAGE_FILL);
$disp_map = gimp_selection_save ($img); $disp_map = gimp_selection_save ($img);
gimp_brushes_set_brush (crystal_brush ($brush_size)); gimp_brushes_set_brush (crystal_brush ($brush_size));
gimp_palette_set_foreground ([0, 0, 0]); gimp_palette_set_foreground ([0, 0, 0]);
@ -1296,14 +1299,14 @@ sub script_fu_crystal_logo {
gimp_image_add_layer_mask ($img, $layer2, $layer_mask2); gimp_image_add_layer_mask ($img, $layer2, $layer_mask2);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($layer_mask2); gimp_edit_fill ($layer_mask2, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_levels ($layer2, 0, 0, 200, 1.5, 50, 255); gimp_levels ($layer2, 0, 0, 200, 1.5, 50, 255);
gimp_layer_set_mode ($layer1, OVERLAY_MODE); gimp_layer_set_mode ($layer1, OVERLAY_MODE);
plug_in_gauss_rle ($img, $text_layer, $blur, 1, 1); plug_in_gauss_rle ($img, $text_layer, $blur, 1, 1);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_layer_set_mode ($text_layer, OVERLAY_MODE); gimp_layer_set_mode ($text_layer, OVERLAY_MODE);
gimp_layer_translate ($text_layer, $offx1, $offy1); gimp_layer_translate ($text_layer, $offx1, $offy1);
gimp_image_remove_channel ($img, $disp_map); gimp_image_remove_channel ($img, $disp_map);
@ -1380,7 +1383,7 @@ sub script_fu_frosty_logo {
$selection = gimp_selection_save ($img); $selection = gimp_selection_save ($img);
gimp_selection_feather ($img, $border); gimp_selection_feather ($img, $border);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($sparkle_layer); gimp_edit_fill ($sparkle_layer, BG_IMAGE_FILL);
plug_in_noisify ($img, $sparkle_layer, 0, 0.2, 0.2, 0.2, 0.0); plug_in_noisify ($img, $sparkle_layer, 0, 0.2, 0.2, 0.2, 0.0);
plug_in_c_astretch ($img, $sparkle_layer); plug_in_c_astretch ($img, $sparkle_layer);
gimp_selection_none ($img); gimp_selection_none ($img);
@ -1392,19 +1395,19 @@ sub script_fu_frosty_logo {
gimp_brushes_set_brush ("Circle Fuzzy (11)"); gimp_brushes_set_brush ("Circle Fuzzy (11)");
gimp_edit_stroke ($matte_layer); gimp_edit_stroke ($matte_layer);
gimp_selection_feather ($img, $border); gimp_selection_feather ($img, $border);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_image_add_layer_mask ($img, $text_layer, $text_layer_mask); gimp_image_add_layer_mask ($img, $text_layer, $text_layer_mask);
gimp_selection_load ($selection); gimp_selection_load ($selection);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($text_layer_mask); gimp_edit_fill ($text_layer_mask, BG_IMAGE_FILL);
gimp_selection_feather ($img, $border); gimp_selection_feather ($img, $border);
gimp_selection_translate ($img, $border / 2, $border / 2); gimp_selection_translate ($img, $border / 2, $border / 2);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_image_remove_layer_mask ($img, $text_layer, 0); gimp_image_remove_layer_mask ($img, $text_layer, 0);
gimp_selection_load ($selection); gimp_selection_load ($selection);
gimp_brushes_set_brush ("Circle Fuzzy (07)"); gimp_brushes_set_brush ("Circle Fuzzy (07)");
@ -1511,7 +1514,7 @@ sub script_fu_glossy_logo {
gimp_image_add_layer ($img, $drop_sh_layer, 2); gimp_image_add_layer ($img, $drop_sh_layer, 2);
gimp_selection_layer_alpha ($drop_sh_layer); gimp_selection_layer_alpha ($drop_sh_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($drop_sh_layer); gimp_edit_fill ($drop_sh_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_gauss_rle ($drop_sh_layer, 15, 1, 1); plug_in_gauss_rle ($drop_sh_layer, 15, 1, 1);
gimp_layer_set_offsets ($drop_sh_layer, $s_offset_x, $s_offset_y); gimp_layer_set_offsets ($drop_sh_layer, $s_offset_x, $s_offset_y);
@ -1582,25 +1585,25 @@ sub script_fu_glowing_logo {
gimp_image_add_layer ($img, $glow_layer, 1); gimp_image_add_layer ($img, $glow_layer, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_feather ($img, $feather1); gimp_selection_feather ($img, $feather1);
gimp_palette_set_background ([221, 0, 0]); gimp_palette_set_background ([221, 0, 0]);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_feather ($img, $feather2); gimp_selection_feather ($img, $feather2);
gimp_palette_set_background ([232, 217, 18]); gimp_palette_set_background ([232, 217, 18]);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_feather ($img, $feather3); gimp_selection_feather ($img, $feather3);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_name ($text_layer, $text); gimp_layer_set_name ($text_layer, $text);
gimp_layer_set_mode ($text_layer, OVERLAY_MODE); gimp_layer_set_mode ($text_layer, OVERLAY_MODE);
@ -1647,17 +1650,17 @@ sub script_fu_gradient_bevel_logo {
gimp_image_add_layer ($img, $bg_layer, 1); gimp_image_add_layer ($img, $bg_layer, 1);
gimp_image_add_layer ($img, $blur_layer, 1); gimp_image_add_layer ($img, $blur_layer, 1);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($blur_layer, 1); gimp_layer_set_preserve_trans ($blur_layer, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_edit_fill ($blur_layer); gimp_edit_fill ($blur_layer, BG_IMAGE_FILL);
gimp_edit_clear ($blur_layer); gimp_edit_clear ($blur_layer);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_preserve_trans ($blur_layer, 0); gimp_layer_set_preserve_trans ($blur_layer, 0);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_edit_fill ($blur_layer); gimp_edit_fill ($blur_layer, BG_IMAGE_FILL);
plug_in_gauss_rle ($img, $blur_layer, $bevel_width, 1, 1); plug_in_gauss_rle ($img, $blur_layer, $bevel_width, 1, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ([127, 127, 127]); gimp_palette_set_background ([127, 127, 127]);
@ -1726,19 +1729,19 @@ sub script_fu_i26_gunya2 {
gimp_edit_clear ($dist_frame_layer); gimp_edit_clear ($dist_frame_layer);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ($text_color); gimp_palette_set_background ($text_color);
gimp_edit_fill ($dist_text_layer); gimp_edit_fill ($dist_text_layer, BG_IMAGE_FILL);
gimp_selection_border ($img, $frame_size); gimp_selection_border ($img, $frame_size);
gimp_palette_set_background ($frame_color); gimp_palette_set_background ($frame_color);
gimp_edit_fill ($dist_frame_layer); gimp_edit_fill ($dist_frame_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($distortion_layer); gimp_edit_fill ($distortion_layer, BG_IMAGE_FILL);
plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0); plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0);
plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1);
plug_in_c_astretch ($distortion_img, $distortion_layer); plug_in_c_astretch ($distortion_img, $distortion_layer);
plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1);
plug_in_displace ($img, $dist_text_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0); plug_in_displace ($img, $dist_text_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0);
gimp_edit_fill ($distortion_layer); gimp_edit_fill ($distortion_layer, BG_IMAGE_FILL);
plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0); plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0);
plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1);
plug_in_c_astretch ($distortion_img, $distortion_layer); plug_in_c_astretch ($distortion_img, $distortion_layer);
@ -1746,7 +1749,7 @@ sub script_fu_i26_gunya2 {
plug_in_displace ($img, $dist_frame_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0); plug_in_displace ($img, $dist_frame_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_palette_set_foreground ($old_fg); gimp_palette_set_foreground ($old_fg);
gimp_palette_set_background ($old_bg); gimp_palette_set_background ($old_bg);
gimp_brushes_set_brush ($old_brush); gimp_brushes_set_brush ($old_brush);
@ -1900,17 +1903,17 @@ sub script_fu_neon_logo {
$selection = gimp_selection_save ($img); $selection = gimp_selection_save ($img);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_edit_clear ($glow_layer); gimp_edit_clear ($glow_layer);
gimp_edit_fill ($tube_layer); gimp_edit_fill ($tube_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_load ($selection); gimp_selection_load ($selection);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($tube_layer); gimp_edit_fill ($tube_layer, BG_IMAGE_FILL);
gimp_selection_shrink ($img, $shrink); gimp_selection_shrink ($img, $shrink);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($selection); gimp_edit_fill ($selection, BG_IMAGE_FILL);
if ($float_height >= 100) { if ($float_height >= 100) {
gimp_edit_fill ($tube_layer); #this way the user has to choose a REAL big font gimp_edit_fill ($tube_layer, BG_IMAGE_FILL); #this way the user has to choose a REAL big font
} #in order to get the original effect!! } #in order to get the original effect!!
gimp_selection_none ($img); gimp_selection_none ($img);
if (not ($feather1 == 0)) { if (not ($feather1 == 0)) {
@ -1946,7 +1949,7 @@ sub script_fu_neon_logo {
gimp_selection_invert ($img); gimp_selection_invert ($img);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_palette_set_background ($glow_color); gimp_palette_set_background ($glow_color);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
if (not ($shadow == 0)) { if (not ($shadow == 0)) {
do { do {
gimp_selection_layer_alpha ($tube_layer); gimp_selection_layer_alpha ($tube_layer);
@ -1954,7 +1957,7 @@ sub script_fu_neon_logo {
gimp_selection_feather ($img, $shadow_feather); gimp_selection_feather ($img, $shadow_feather);
gimp_selection_translate ($img, $shadow_offx, $shadow_offy); gimp_selection_translate ($img, $shadow_offx, $shadow_offy);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
}; };
} }
gimp_selection_none ($img); gimp_selection_none ($img);
@ -2007,7 +2010,7 @@ sub script_fu_newsprint_text {
gimp_image_add_layer_mask ($img, $text_layer, $text_mask); gimp_image_add_layer_mask ($img, $text_layer, $text_mask);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([$grey, $grey, $grey]); gimp_palette_set_background ([$grey, $grey, $grey]);
gimp_edit_fill ($text_mask); gimp_edit_fill ($text_mask, BG_IMAGE_FILL);
plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 45.0, 3, 45.0, 0, 45.0, 0, 45.0, 0, 3); plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 45.0, 3, 45.0, 0, 45.0, 0, 45.0, 0, 3);
gimp_image_remove_layer_mask ($img, $text_layer, APPLY); gimp_image_remove_layer_mask ($img, $text_layer, APPLY);
gimp_palette_set_background ($old_bg); gimp_palette_set_background ($old_bg);
@ -2163,21 +2166,21 @@ sub script_fu_sota_chrome_logo {
gimp_image_add_layer ($img, $layer2, 0); gimp_image_add_layer ($img, $layer2, 0);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_edit_clear ($shadow); gimp_edit_clear ($shadow);
gimp_layer_set_visible ($text_layer, 0); gimp_layer_set_visible ($text_layer, 0);
gimp_layer_set_visible ($shadow, 0); gimp_layer_set_visible ($shadow, 0);
gimp_rect_select ($img, $b_size / 2, $b_size / 2, ($width - $b_size), ($height - $b_size), REPLACE, 0, 0); gimp_rect_select ($img, $b_size / 2, $b_size / 2, ($width - $b_size), ($height - $b_size), REPLACE, 0, 0);
gimp_rect_select ($img, $b_size, $b_size, ($width - $b_size * 2), ($height - $b_size * 2), SUB, 0, 0); gimp_rect_select ($img, $b_size, $b_size, ($width - $b_size * 2), ($height - $b_size * 2), SUB, 0, 0);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_translate ($img, $offx1, $offy1);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_edit_fill ($layer2); gimp_edit_fill ($layer2, BG_IMAGE_FILL);
gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2);
gimp_edit_fill ($layer3); gimp_edit_fill ($layer3, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_visible ($layer2, 1); gimp_layer_set_visible ($layer2, 1);
gimp_layer_set_visible ($layer3, 1); gimp_layer_set_visible ($layer3, 1);
@ -2197,7 +2200,7 @@ sub script_fu_sota_chrome_logo {
gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_image_add_layer_mask ($img, $layer1, $layer_mask);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($layer_mask); gimp_edit_fill ($layer_mask, BG_IMAGE_FILL);
$layer2 = gimp_layer_copy ($layer1, 1); $layer2 = gimp_layer_copy ($layer1, 1);
gimp_image_add_layer ($img, $layer2, 0); gimp_image_add_layer ($img, $layer2, 0);
gimp_brushes_set_brush (brush ($brush_size)); gimp_brushes_set_brush (brush ($brush_size));
@ -2206,7 +2209,7 @@ sub script_fu_sota_chrome_logo {
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_feather ($img, $feather * 1.5); gimp_selection_feather ($img, $feather * 1.5);
gimp_selection_translate ($img, 2.5 * $offx1, 2.5 * $offy1); gimp_selection_translate ($img, 2.5 * $offx1, 2.5 * $offy1);
gimp_edit_fill ($shadow); gimp_edit_fill ($shadow, BG_IMAGE_FILL);
gimp_selection_all ($img); gimp_selection_all ($img);
gimp_patterns_set_pattern ("Marble #1"); gimp_patterns_set_pattern ("Marble #1");
gimp_bucket_fill ($text_layer, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); gimp_bucket_fill ($text_layer, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0);
@ -2285,14 +2288,14 @@ sub script_fu_speed_text {
gimp_layer_set_edit_mask ($text_layer, 0); gimp_layer_set_edit_mask ($text_layer, 0);
gimp_selection_grow ($img, 10); gimp_selection_grow ($img, 10);
gimp_palette_set_background ($old_fg); gimp_palette_set_background ($old_fg);
gimp_edit_fill ($text_layer); gimp_edit_fill ($text_layer, BG_IMAGE_FILL);
gimp_layer_set_edit_mask ($text_layer, 1); gimp_layer_set_edit_mask ($text_layer, 1);
gimp_selection_load ($saved_sel); gimp_selection_load ($saved_sel);
gimp_selection_feather ($img, 10); gimp_selection_feather ($img, 10);
gimp_palette_set_background ([$grey, $grey, $grey]); gimp_palette_set_background ([$grey, $grey, $grey]);
gimp_edit_fill ($text_mask); gimp_edit_fill ($text_mask, BG_IMAGE_FILL);
gimp_edit_fill ($text_mask); gimp_edit_fill ($text_mask, BG_IMAGE_FILL);
gimp_edit_fill ($text_mask); gimp_edit_fill ($text_mask, BG_IMAGE_FILL);
gimp_selection_clear ($img); gimp_selection_clear ($img);
plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 0.0, 1, 45.0, 0, 45.0, 0, 45.0, 0, 5); plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 0.0, 1, 45.0, 0, 45.0, 0, 45.0, 0, 5);
gimp_image_remove_layer_mask ($img, $text_layer, APPLY); gimp_image_remove_layer_mask ($img, $text_layer, APPLY);
@ -2347,7 +2350,7 @@ sub script_fu_starburst_logo {
gimp_image_add_layer_mask ($img, $burst_layer, $layer_mask); gimp_image_add_layer_mask ($img, $burst_layer, $layer_mask);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ($bg_color); gimp_palette_set_background ($bg_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($shadow_layer); gimp_edit_clear ($shadow_layer);
gimp_edit_clear ($burst_layer); gimp_edit_clear ($burst_layer);
gimp_selection_all ($img); gimp_selection_all ($img);
@ -2356,7 +2359,7 @@ sub script_fu_starburst_logo {
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($layer_mask); gimp_edit_fill ($layer_mask, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100, 0); plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100, 0);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
@ -2365,7 +2368,7 @@ sub script_fu_starburst_logo {
gimp_selection_translate ($img, -1, -1); gimp_selection_translate ($img, -1, -1);
while ($count < $off) { while ($count < $off) {
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_translate ($img, 1, 1); gimp_selection_translate ($img, 1, 1);
$count = ($count + 1); $count = ($count + 1);
} }
@ -2476,7 +2479,7 @@ sub script_fu_starscape_logo {
gimp_image_add_layer ($img, $shadow_layer, 1); gimp_image_add_layer ($img, $shadow_layer, 1);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_edit_clear ($shadow_layer); gimp_edit_clear ($shadow_layer);
gimp_edit_clear ($glow_layer); gimp_edit_clear ($glow_layer);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
@ -2484,12 +2487,12 @@ sub script_fu_starscape_logo {
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_palette_set_background ($glow_color); gimp_palette_set_background ($glow_color);
gimp_selection_feather ($img, $feather); gimp_selection_feather ($img, $feather);
gimp_edit_fill ($glow_layer); gimp_edit_fill ($glow_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_selection_feather ($img, $shadow_feather); gimp_selection_feather ($img, $shadow_feather);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_selection_translate ($img, $offx, $offy); gimp_selection_translate ($img, $offx, $offy);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ([31, 31, 31]); gimp_palette_set_background ([31, 31, 31]);
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
@ -2553,7 +2556,7 @@ sub script_fu_t_o_p_logo {
gimp_edit_clear ($shadow_layer); gimp_edit_clear ($shadow_layer);
gimp_edit_clear ($sparkle_layer); gimp_edit_clear ($sparkle_layer);
gimp_palette_set_background ($base_color); gimp_palette_set_background ($base_color);
gimp_edit_fill ($sparkle_layer); gimp_edit_fill ($sparkle_layer, BG_IMAGE_FILL);
gimp_palette_set_background ($base_color); gimp_palette_set_background ($base_color);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
$selection = gimp_selection_save ($img); $selection = gimp_selection_save ($img);
@ -2587,10 +2590,10 @@ sub script_fu_t_o_p_logo {
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_brushes_set_brush ("Circle Fuzzy (11)"); gimp_brushes_set_brush ("Circle Fuzzy (11)");
gimp_selection_feather ($img, $border); gimp_selection_feather ($img, $border);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_palette_set_background ($base_color); gimp_palette_set_background ($base_color);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_selection_load ($selection); gimp_selection_load ($selection);
gimp_brushes_set_brush ("Circle Fuzzy (07)"); gimp_brushes_set_brush ("Circle Fuzzy (07)");
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
@ -2668,16 +2671,16 @@ sub script_fu_textured_logo {
gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL); gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2); gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($shadow_layer); gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask); gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($tsl_layer_mask); gimp_edit_fill ($tsl_layer_mask, BG_IMAGE_FILL);
gimp_selection_feather ($img, $f_size); gimp_selection_feather ($img, $f_size);
gimp_palette_set_background ([63, 63, 63]); gimp_palette_set_background ([63, 63, 63]);
gimp_edit_fill ($drop_shadow_layer); gimp_edit_fill ($drop_shadow_layer, BG_IMAGE_FILL);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($text_shadow_layer); gimp_edit_fill ($text_shadow_layer, BG_IMAGE_FILL);
gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_foreground ([255, 255, 255]);
gimp_blend ($text_shadow_layer, FG_BG_RGB, NORMAL_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1); gimp_blend ($text_shadow_layer, FG_BG_RGB, NORMAL_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1);
gimp_selection_none ($img); gimp_selection_none ($img);
@ -2692,7 +2695,7 @@ sub script_fu_textured_logo {
gimp_selection_layer_alpha ($blend_layer); gimp_selection_layer_alpha ($blend_layer);
gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask); gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($dsl_layer_mask); gimp_edit_fill ($dsl_layer_mask, BG_IMAGE_FILL);
gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_layer_set_name ($text_layer, $text); gimp_layer_set_name ($text_layer, $text);
@ -2753,23 +2756,23 @@ sub script_fu_title_header {
gimp_layer_set_offsets ($bumpmap_layer, $text_layers_offset, 0); gimp_layer_set_offsets ($bumpmap_layer, $text_layers_offset, 0);
gimp_layer_set_offsets ($fore_layer, $text_layers_offset, 0); gimp_layer_set_offsets ($fore_layer, $text_layers_offset, 0);
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($bumpmap_layer); gimp_edit_fill ($bumpmap_layer, BG_IMAGE_FILL);
gimp_selection_layer_alpha ($text_layer); gimp_selection_layer_alpha ($text_layer);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($bumpmap_layer); gimp_edit_fill ($bumpmap_layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
plug_in_gauss_rle ($img, $bumpmap_layer, 4.0, 1, 1); plug_in_gauss_rle ($img, $bumpmap_layer, 4.0, 1, 1);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($fore_layer); gimp_edit_fill ($fore_layer, BG_IMAGE_FILL);
plug_in_bump_map ($img, $fore_layer, $bumpmap_layer, 135.0, 45.0, 4, 0, 0, 0, 0, 0, 0, 0); plug_in_bump_map ($img, $fore_layer, $bumpmap_layer, 135.0, 45.0, 4, 0, 0, 0, 0, 0, 0, 0);
gimp_layer_set_visible ($text_layer, 1); gimp_layer_set_visible ($text_layer, 1);
gimp_layer_set_preserve_trans ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1);
gimp_blend ($text_layer, CUSTOM, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0.2, 3, $padding, $padding, ($text_width - $padding - 1), ($text_height - $padding - 1)); gimp_blend ($text_layer, CUSTOM, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0.2, 3, $padding, $padding, ($text_width - $padding - 1), ($text_height - $padding - 1));
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_ellipse_select ($img, 0, 0, $text_height, $text_height, REPLACE, 1, 0, 0); gimp_ellipse_select ($img, 0, 0, $text_height, $text_height, REPLACE, 1, 0, 0);
gimp_palette_set_background (gimp_color_picker ($text_layer, $text_layers_offset, 0, 1, 0, 6, 0)); gimp_palette_set_background (gimp_color_picker ($text_layer, $text_layers_offset, 0, 1, 0, 6, 0));
gimp_edit_fill ($bg_layer); gimp_edit_fill ($bg_layer, BG_IMAGE_FILL);
gimp_rect_select ($img, ($img_width - $fade_width), 0, $fade_width, $text_height, REPLACE, 0, 0); gimp_rect_select ($img, ($img_width - $fade_width), 0, $fade_width, $text_height, REPLACE, 0, 0);
gimp_palette_set_foreground (gimp_palette_get_background ()); gimp_palette_set_foreground (gimp_palette_get_background ());
gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_background ([0, 0, 0]);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# pcg@goof.com # pcg@goof.com
# a fairly complete miff save filter # a fairly complete miff save filter

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
#BEGIN {$^W=1}; #BEGIN {$^W=1};

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp ('__','N_'); use Gimp ('__','N_');
use Gimp::Feature; use Gimp::Feature;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
# This is tigert's request. I suppose it'll be useful to those that do # This is tigert's request. I suppose it'll be useful to those that do

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto N_ __); use Gimp qw(:auto N_ __);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp; use Gimp;
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
# This is adrian's idea - take random blends and difference them. You're # This is adrian's idea - take random blends and difference them. You're
# bound to come up w/ something cool eventually. # bound to come up w/ something cool eventually.

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# <sjburges@gimp.org> # <sjburges@gimp.org>
# This is adrian's idea - take random blends and difference them. You're # This is adrian's idea - take random blends and difference them. You're
# bound to come up w/ something cool eventually. # bound to come up w/ something cool eventually.

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Use gaussian blur and levels to round selection corners # Use gaussian blur and levels to round selection corners
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp; use Gimp;
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# Note: Seth has transferred the maintainer `position' to me, so bother me # Note: Seth has transferred the maintainer `position' to me, so bother me

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -52,7 +55,7 @@ register "stampify",
$pos = $pos + $diameter + $gap; $pos = $pos + $diameter + $gap;
} }
gimp_palette_set_background($hole); gimp_palette_set_background($hole);
gimp_edit_fill($layer1); gimp_edit_fill($layer1, BG_IMAGE_FILL);
gimp_selection_none($img2); gimp_selection_none($img2);
# here comes the clever part! :-) # here comes the clever part! :-)
# offset horis and vert holes by half the diameter # offset horis and vert holes by half the diameter

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -13,7 +16,7 @@ sub stamps {
$layer = gimp_layer_new($img, $size, $size, RGB_IMAGE, "Layer 1", 100, NORMAL_MODE); $layer = gimp_layer_new($img, $size, $size, RGB_IMAGE, "Layer 1", 100, NORMAL_MODE);
gimp_image_add_layer($layer, -1); gimp_image_add_layer($layer, -1);
gimp_palette_set_background($hole); gimp_palette_set_background($hole);
$layer->gimp_edit_fill; $layer->gimp_edit_fill(BG_IMAGE_FILL);
gimp_selection_none($img); gimp_selection_none($img);
my $ncircles = int(($size + $gap) / ($diameter + $gap)); my $ncircles = int(($size + $gap) / ($diameter + $gap));
@ -30,7 +33,7 @@ sub stamps {
$x = $x + $diameter + $gap; $x = $x + $diameter + $gap;
} }
gimp_palette_set_background($paper); gimp_palette_set_background($paper);
gimp_edit_fill($layer); gimp_edit_fill($layer, BG_IMAGE_FILL);
gimp_selection_none($img); gimp_selection_none($img);
# here, at last, comes the clever part! :-) # here, at last, comes the clever part! :-)

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Terral Text # Terral Text
# by Seth Burgess <sjburges@gimp.org> # by Seth Burgess <sjburges@gimp.org>
@ -68,7 +71,7 @@ sub {
"TextLayer", 100, 0); "TextLayer", 100, 0);
$img->add_layer($textlayer,1); $img->add_layer($textlayer,1);
palette_set_background([255,255,255]); palette_set_background([255,255,255]);
$textlayer->edit_fill(); $textlayer->edit_fill(BG_IMAGE_FILL);
palette_set_foreground([0,0,0]); palette_set_foreground([0,0,0]);
# Place centered Text - what a PITA! # Place centered Text - what a PITA!

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
###################################################################### ######################################################################
# A Perl::Fu plugin for converting TeX strings to floating layers. # A Perl::Fu plugin for converting TeX strings to floating layers.
# #
@ -116,13 +119,13 @@ sub grey_file_to_float {
gimp_floating_sel_anchor($floating_layer); gimp_floating_sel_anchor($floating_layer);
gimp_invert($mask); gimp_invert($mask);
gimp_palette_set_background(gimp_palette_get_foreground()); gimp_palette_set_background(gimp_palette_get_foreground());
gimp_edit_fill($grey_layer); gimp_edit_fill($grey_layer, BG_IMAGE_FILL);
gimp_image_remove_layer_mask($grey_img, $grey_layer, 0); gimp_image_remove_layer_mask($grey_img, $grey_layer, 0);
# Now copy this layer to $img 1 # Now copy this layer to $img 1
gimp_edit_copy($grey_layer); gimp_edit_copy($grey_layer);
$floating_layer = gimp_edit_paste($drw1, 0); $floating_layer = gimp_edit_paste($drw1, 0);
gimp_edit_fill($floating_layer); gimp_edit_fill($floating_layer, BG_IMAGE_FILL);
print STDERR "Yohoo!\n"; print STDERR "Yohoo!\n";
cleanup(); cleanup();

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;
@ -28,7 +31,7 @@ sub my_code {
gimp_selection_layer_alpha ($layer); gimp_selection_layer_alpha ($layer);
gimp_selection_invert ($img); gimp_selection_invert ($img);
gimp_palette_set_background ([255, 255, 255]); gimp_palette_set_background ([255, 255, 255]);
gimp_edit_fill ($layer); gimp_edit_fill ($layer, BG_IMAGE_FILL);
gimp_selection_none ($img); gimp_selection_none ($img);
gimp_invert ($layer); gimp_invert ($layer);
plug_in_gauss_rle ($layer, 2.0, 1, 1); plug_in_gauss_rle ($layer, 2.0, 1, 1);
@ -41,7 +44,7 @@ sub my_code {
gimp_bucket_fill ($bump_lay, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); gimp_bucket_fill ($bump_lay, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0);
} else { } else {
gimp_palette_set_background ($txt_col); gimp_palette_set_background ($txt_col);
gimp_edit_fill ($bump_lay); gimp_edit_fill ($bump_lay, BG_IMAGE_FILL);
} }
plug_in_bump_map ($img, $bump_lay, $layer, 110.0, 45.0, 4, 0, 0, 0, 0, 1, 0, 0); plug_in_bump_map ($img, $bump_lay, $layer, 110.0, 45.0, 4, 0, 0, 0, 0, 1, 0, 0);
$pattern_mask = gimp_layer_create_mask ($bump_lay, ALPHA_MASK); $pattern_mask = gimp_layer_create_mask ($bump_lay, ALPHA_MASK);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp qw(:auto __ N_); use Gimp qw(:auto __ N_);
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
use Gimp; use Gimp;
use Gimp::Fu; use Gimp::Fu;

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# sent to me by Seth Burgess <sjburges@gimp.org> # sent to me by Seth Burgess <sjburges@gimp.org>
# small changes my Marc Lehmann <pcg@goof.com> # small changes my Marc Lehmann <pcg@goof.com>

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# This is (hopefully) a demonstration of how pathetically easy it is to script # This is (hopefully) a demonstration of how pathetically easy it is to script
# a neato effect you've come up with. This lil' effect was created by xach, # a neato effect you've come up with. This lil' effect was created by xach,
# and translated by sjburges (me). You can consider it released under the GPL # and translated by sjburges (me). You can consider it released under the GPL
@ -70,7 +73,7 @@ register "xach_blocks",
$img->selection_all; $img->selection_all;
gimp_edit_clear($gridlayer); gimp_edit_clear($gridlayer);
gimp_palette_set_background([255,255,255]); gimp_palette_set_background([255,255,255]);
gimp_edit_fill($gridlayer); gimp_edit_fill($gridlayer, BG_IMAGE_FILL);
$gridlayer->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0); $gridlayer->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0);
$gridlayer->plug_in_gauss_iir(0.7*$blocksize, 1, 1); $gridlayer->plug_in_gauss_iir(0.7*$blocksize, 1, 1);
@ -92,7 +95,7 @@ register "xach_blocks",
$cleangrid = $img->layer_new($img->width, $img->height, $cleangrid = $img->layer_new($img->width, $img->height,
RGBA_IMAGE, "Grid 2", 100, 0); RGBA_IMAGE, "Grid 2", 100, 0);
$img->add_layer($cleangrid,0); $img->add_layer($cleangrid,0);
gimp_edit_fill($cleangrid); gimp_edit_fill($cleangrid, BG_IMAGE_FILL);
$cleangrid->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0); $cleangrid->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0);
gimp_selection_load($selection); gimp_selection_load($selection);
$drawable->plug_in_bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0); $drawable->plug_in_bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell if 0; # not running under some shell
@ -72,7 +75,7 @@ register "xach_shadows",
$img->selection_all; $img->selection_all;
gimp_edit_clear($gridlayer); gimp_edit_clear($gridlayer);
gimp_palette_set_background([255,255,255]); gimp_palette_set_background([255,255,255]);
gimp_edit_fill($gridlayer); gimp_edit_fill($gridlayer, BG_IMAGE_FILL);
$gridlayer->plug_in_grid((1, $blocksize, 0, [0,0,0], 255) x 3); $gridlayer->plug_in_grid((1, $blocksize, 0, [0,0,0], 255) x 3);
gimp_layer_set_mode($gridlayer, 3); gimp_layer_set_mode($gridlayer, 3);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Once again, an effect of Xach's # Once again, an effect of Xach's
# Created by Seth Burgess <sjburges@gimp.org> # Created by Seth Burgess <sjburges@gimp.org>
@ -31,11 +34,11 @@ register "xachvision",
$img->add_layer($toplayer, 0); $img->add_layer($toplayer, 0);
gimp_palette_set_background($color); gimp_palette_set_background($color);
$toplayer->edit_fill(); $toplayer->edit_fill(BG_IMAGE_FILL);
$toplayer->set_mode(COLOR_MODE); $toplayer->set_mode(COLOR_MODE);
gimp_palette_set_background([0,0,0]); gimp_palette_set_background([0,0,0]);
$drawable->edit_fill(); $drawable->edit_fill(BG_IMAGE_FILL);
$amt = $amt/255; $amt = $amt/255;
$midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt); $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt);

View File

@ -1,4 +1,7 @@
#!/usr/bin/perl #!/usr/app/bin/perl
eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# #
# Gimp yin/yang symbol plugin for The Gimp. Extract documentation by running # Gimp yin/yang symbol plugin for The Gimp. Extract documentation by running
# "perldoc" on this plugin, or by using the pod utilities (pod2man, pod2html, # "perldoc" on this plugin, or by using the pod utilities (pod2man, pod2html,

View File

@ -3,6 +3,11 @@
# a lame attempt at xgettext for perl # a lame attempt at xgettext for perl
# line line numbers, yet # line line numbers, yet
# 5.005_02 in particular seems to have a BIG BUG
# resulting in an endless loop and a memory leak in the
# regex machinery :(
exit 1 unless $] > 5.005_03;
undef $/; undef $/;
print <<'EOF'; print <<'EOF';

View File

@ -167,7 +167,7 @@ sub parse() {
if ($word eq "(") { if ($word eq "(") {
my $t = $tok; get; my $t = $tok; get;
my @t = &parse; my @t = &parse;
$word eq ")" or die "missing right paranthese (got $word)\n"; $word eq ")" or die "missing right parenthesis (got $word)\n";
push(@toks,[$t,@t,$tok]); get; push(@toks,[$t,@t,$tok]); get;
} elsif ($word eq ")") { } elsif ($word eq ")") {
$depth--; $depth--;