diff --git a/plug-ins/perl/Changes b/plug-ins/perl/Changes index 7b5b429613..0eeab7b681 100644 --- a/plug-ins/perl/Changes +++ b/plug-ins/perl/Changes @@ -9,6 +9,9 @@ Revision history for Gimp-Perl extension. - added blowinout.pl, terral_text and xachvision.pl. - the use of Gimp::PDL to access the region/tile functions is now mandatory. The old string interface does not exist anymore. + - the path to the server-socket now includes the UID, to avoid + collisions. CGI-scripts should use either tcp or specify the path + directly using GIMP_HOST (see Gimp::Net for details). 1.055 Mon Feb 22 22:38:44 CET 1999 - applied seth's script changes. diff --git a/plug-ins/perl/Gimp/Net.pm b/plug-ins/perl/Gimp/Net.pm index 3d1aba7aa7..2fd64eb58a 100644 --- a/plug-ins/perl/Gimp/Net.pm +++ b/plug-ins/perl/Gimp/Net.pm @@ -16,7 +16,7 @@ use subs qw(gimp_call_procedure); use IO::Socket; $default_tcp_port = 10009; -$default_unix_dir = "/tmp/gimp-perl-serv/"; +$default_unix_dir = "/tmp/gimp-perl-serv-uid-$>/"; $default_unix_sock = "gimp-perl-serv"; $trace_res = *STDERR; diff --git a/plug-ins/perl/MANIFEST b/plug-ins/perl/MANIFEST index 5d6aef77a3..5c23dfa9f8 100644 --- a/plug-ins/perl/MANIFEST +++ b/plug-ins/perl/MANIFEST @@ -59,3 +59,4 @@ examples/parasite-editor examples/scratches.pl examples/blowinout.pl examples/terral_text +examples/xachvision.pl diff --git a/plug-ins/perl/Makefile.PL b/plug-ins/perl/Makefile.PL index 2dec87aa5d..afa9996c06 100644 --- a/plug-ins/perl/Makefile.PL +++ b/plug-ins/perl/Makefile.PL @@ -117,7 +117,7 @@ EOF @examples = qw(windy.pl prep4gif.pl webify.pl PDB alpha2color.pl tex-to-float ditherize.pl border.pl view3d.pl feedback.pl xachlego.pl xachshadow.pl parasite-editor - scratches.pl blowinout.pl terral_text); + scratches.pl blowinout.pl terral_text xachvision.pl); @shebang = (map("examples/$_",@examples), qw(Perl-Server scm2perl scm2scm examples/example-net.pl examples/homepage-logo.pl examples/example-fu.pl)); diff --git a/plug-ins/perl/examples/xachvision.pl b/plug-ins/perl/examples/xachvision.pl new file mode 100644 index 0000000000..3a64feb97a --- /dev/null +++ b/plug-ins/perl/examples/xachvision.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl + +# Once again, an effect of Xach's +# Created by Seth Burgess + +use Gimp; +use Gimp::Fu; + +register "xachvision", + "Xach Survielence Camera/XachVision", + "This makes an interlaced-looking machine vision type thing.", + "Seth Burgess", + "Seth Burgess ", + "1999-02-28", + "/Filters/Noise/Xach Vision", + "RGB*, GRAY*", + [ + [PF_COLOR, "Color", "What Color to see the world in", [0, 255, 0]], + [PF_SLIDER, "Added Noise", "How much noise to add", 25, [0,255,5]] + ], + sub { + my($img,$drawable,$color,$amt) =@_; + + eval { $img->undo_push_group_start }; + $oldbackground = gimp_palette_get_background(); + + $midlayer = $drawable->gimp_layer_copy(1); + $img->add_layer($midlayer, 0); + + $toplayer = $drawable->gimp_layer_copy(0); + $img->add_layer($toplayer, 0); + + gimp_palette_set_background($color); + $toplayer->edit_fill(); + $toplayer->set_mode(COLOR_MODE); + + gimp_palette_set_background([0,0,0]); + $drawable->edit_fill(); + + $amt = $amt/255; + $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt); + $midmask = $midlayer->create_mask(0); + $img->add_layer_mask($midlayer, $midmask); + $midmask->plug_in_grid($img->height * 3, 3, 0, 0); + $midmask->plug_in_gauss_iir(1.01, 1, 1); + + gimp_palette_set_background($oldbackground); + eval { $img->undo_push_group_end }; + gimp_displays_flush(); + return(); +}; +exit main; +