see plug-ins/perl/Changes
This commit is contained in:
@ -4,6 +4,8 @@ Revision history for Gimp-Perl extension.
|
|||||||
- region functions (except data) wrongly returned transposed matrices.
|
- region functions (except data) wrongly returned transposed matrices.
|
||||||
Now the order of dimensions is bpp <- width <- height.
|
Now the order of dimensions is bpp <- width <- height.
|
||||||
- implemented and added examples/gouge.
|
- implemented and added examples/gouge.
|
||||||
|
- fixed warnings in case no pod documentation is found.
|
||||||
|
- added examples/logulator.
|
||||||
|
|
||||||
1.098 Wed Jul 21 20:57:12 CEST 1999
|
1.098 Wed Jul 21 20:57:12 CEST 1999
|
||||||
- do not try to compile gimp_personal_rc_file without gimp-1.1.
|
- do not try to compile gimp_personal_rc_file without gimp-1.1.
|
||||||
|
@ -40,8 +40,8 @@ sub new {
|
|||||||
sub _cache {
|
sub _cache {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $fmt = shift;
|
my $fmt = shift;
|
||||||
local $^W = 0;
|
|
||||||
if (!$self->{doc}{$fmt} && $converter{$fmt}) {
|
if (!$self->{doc}{$fmt} && $converter{$fmt}) {
|
||||||
|
local $^W = 0;
|
||||||
my $doc = $converter{$fmt}->($self->{path});
|
my $doc = $converter{$fmt}->($self->{path});
|
||||||
undef $doc if $?>>8;
|
undef $doc if $?>>8;
|
||||||
undef $doc if $doc=~/^[ \t\r\n]*$/;
|
undef $doc if $doc=~/^[ \t\r\n]*$/;
|
||||||
@ -66,10 +66,12 @@ sub section {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $doc = $self->_cache('text');
|
my $doc = $self->_cache('text');
|
||||||
($doc) = $$doc =~ /^$_[0]$(.*?)^[A-Z]/sm;
|
($doc) = $$doc =~ /^$_[0]$(.*?)^[A-Z]/sm;
|
||||||
$doc =~ y/\r//d;
|
if ($doc) {
|
||||||
$doc =~ s/^\s*\n//;
|
$doc =~ y/\r//d;
|
||||||
$doc =~ s/[ \t\r\n]+$/\n/;
|
$doc =~ s/^\s*\n//;
|
||||||
$doc =~ s/^ //mg;
|
$doc =~ s/[ \t\r\n]+$/\n/;
|
||||||
|
$doc =~ s/^ //mg;
|
||||||
|
}
|
||||||
$doc;
|
$doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,4 +105,4 @@ logo.xpm
|
|||||||
examples/frame_reshuffle
|
examples/frame_reshuffle
|
||||||
examples/frame_filter
|
examples/frame_filter
|
||||||
examples/gouge
|
examples/gouge
|
||||||
|
examples/logulator
|
||||||
|
@ -13,6 +13,7 @@ $|=1;
|
|||||||
perlotine randomblends innerbevel fit-text guidegrid roundrectsel
|
perlotine randomblends innerbevel fit-text guidegrid roundrectsel
|
||||||
repdup centerguide stampify goldenmean triangle billboard mirrorsplit
|
repdup centerguide stampify goldenmean triangle billboard mirrorsplit
|
||||||
oneliners randomart1 pixelmap glowing_steel frame_reshuffle frame_filter
|
oneliners randomart1 pixelmap glowing_steel frame_reshuffle frame_filter
|
||||||
|
logulator
|
||||||
);
|
);
|
||||||
@shebang = (map("examples/$_",@examples),
|
@shebang = (map("examples/$_",@examples),
|
||||||
qw(Perl-Server examples/example-net.pl examples/homepage-logo.pl
|
qw(Perl-Server examples/example-net.pl examples/homepage-logo.pl
|
||||||
@ -139,7 +140,7 @@ install ::
|
|||||||
exit ; \
|
exit ; \
|
||||||
fi \
|
fi \
|
||||||
done ; \
|
done ; \
|
||||||
$(MAKE) UNINST=0 really-install install-plugins'."
|
$(MAKE) UNINST=1 really-install install-plugins'."
|
||||||
$main::dont_embed || (cd embed && \$(MAKE) install)
|
$main::dont_embed || (cd embed && \$(MAKE) install)
|
||||||
|
|
||||||
".$install;
|
".$install;
|
||||||
|
@ -8,6 +8,9 @@ gimp ~/pix/ka001.jpg -b "(extension-perl-server 0 0 0)"
|
|||||||
file:///usr/app/lib/perl5/site_perl/i686-linux/PDL/HtmlDocs/PDL/
|
file:///usr/app/lib/perl5/site_perl/i686-linux/PDL/HtmlDocs/PDL/
|
||||||
make test TEST_VERBOSE=1
|
make test TEST_VERBOSE=1
|
||||||
|
|
||||||
|
plug_in (1, ,gimp_file_load
|
||||||
|
WHITE_MASK -> ADD
|
||||||
|
|
||||||
bugs
|
bugs
|
||||||
|
|
||||||
[DONE] * MJH: glib-config(!!!)
|
[DONE] * MJH: glib-config(!!!)
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# implements some algorithms described in
|
# implements some algorithms described in (the otherwise very bad)
|
||||||
# http://www.biocomputer.com/Thesis.html
|
# http://www.biocomputer.com/Thesis.html
|
||||||
|
|
||||||
|
# these are all simple 2x2 kernels, fast but relatively effective
|
||||||
|
|
||||||
use Gimp::Feature 'pdl';
|
use Gimp::Feature 'pdl';
|
||||||
use Gimp 1.098;
|
use Gimp 1.098;
|
||||||
use Gimp::Fu;
|
use Gimp::Fu;
|
||||||
@ -28,12 +30,15 @@ sub iterate {
|
|||||||
my $area = $bounds[2]*$bounds[3];
|
my $area = $bounds[2]*$bounds[3];
|
||||||
my $progress = 0;
|
my $progress = 0;
|
||||||
|
|
||||||
|
use Time::HiRes 'time';
|
||||||
|
$s=time;
|
||||||
do {
|
do {
|
||||||
my ($x,$y,$w,$h)=($dst->x,$dst->y,$dst->w,$dst->h);
|
my ($x,$y,$w,$h)=($dst->x,$dst->y,$dst->w,$dst->h);
|
||||||
$dst->data($kernel->($bpp,$src->get_rect($x,$y,$w+1,$h+1)->convert(short)));
|
$dst->data($kernel->($bpp,$src->get_rect($x,$y,$w+1,$h+1)->convert(short)));
|
||||||
$progress += $w*$h/$area;
|
$progress += $w*$h/$area;
|
||||||
Gimp->progress_update ($progress);
|
Gimp->progress_update ($progress);
|
||||||
} while (Gimp->pixel_rgns_process ($iter));
|
} while (Gimp->pixel_rgns_process ($iter));
|
||||||
|
print time-$s;
|
||||||
}
|
}
|
||||||
Gimp->progress_update (1);
|
Gimp->progress_update (1);
|
||||||
|
|
||||||
@ -43,20 +48,20 @@ sub iterate {
|
|||||||
();
|
();
|
||||||
}
|
}
|
||||||
|
|
||||||
register "gouge_smooth",
|
register "blur_2x2",
|
||||||
"smooth (low pass filter) an image using the gouge algorithm",
|
"smooth (low pass filter) an image using a fast 2x2 kernel",
|
||||||
"Low-Pass filtering (smoothing) using a fast algorithm found in a paper by James O. Gouge.",
|
"Low-pass filtering (smoothing) using a fast 2x2 kernel",
|
||||||
"Marc Lehmann",
|
"Marc Lehmann",
|
||||||
"Marc Lehmann <pcg\@goof.com>",
|
"Marc Lehmann <pcg\@goof.com>",
|
||||||
"19990723",
|
"19990725",
|
||||||
"<Image>/Filters/Blur/Gouge",
|
"<Image>/Filters/Blur/2x2 Blur",
|
||||||
"RGB*, GRAY*",
|
"RGB*, GRAY*",
|
||||||
[],
|
[],
|
||||||
sub {
|
sub {
|
||||||
my($image,$drawable)=@_;
|
my($image,$drawable)=@_;
|
||||||
|
|
||||||
iterate $drawable,
|
iterate $drawable,
|
||||||
"Gouge smoothing...",
|
"2x2 smoothing...",
|
||||||
sub {
|
sub {
|
||||||
($_[1]->slice("$_[0]0:-2,0:-2")+
|
($_[1]->slice("$_[0]0:-2,0:-2")+
|
||||||
$_[1]->slice("$_[0]1:-1,0:-2")+
|
$_[1]->slice("$_[0]1:-1,0:-2")+
|
||||||
@ -65,20 +70,20 @@ register "gouge_smooth",
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
register "gouge_contrast",
|
register "contrast_enhance_2x2",
|
||||||
"contrast enhance an image using the gouge algorithm",
|
"contrast enhance an image using a fast 2x2 kernel",
|
||||||
"Contrast Enhance an image using a fast algorithm found in a paper by James O. Gouge.",
|
"Contrast Enhance an image using a fast 2x2 kernel",
|
||||||
"Marc Lehmann",
|
"Marc Lehmann",
|
||||||
"Marc Lehmann <pcg\@goof.com>",
|
"Marc Lehmann <pcg\@goof.com>",
|
||||||
"19990723",
|
"19990725",
|
||||||
"<Image>/Filters/Enhance/Contrast",
|
"<Image>/Filters/Enhance/2x2 Contrast Enhance",
|
||||||
"RGB*, GRAY*",
|
"RGB*, GRAY*",
|
||||||
[],
|
[],
|
||||||
sub {
|
sub {
|
||||||
my($image,$drawable)=@_;
|
my($image,$drawable)=@_;
|
||||||
|
|
||||||
iterate $drawable,
|
iterate $drawable,
|
||||||
"Gouge contrast enhancing...",
|
"2x2 contrast enhancing...",
|
||||||
sub {
|
sub {
|
||||||
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
|
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
|
||||||
my $D = $_[1]->slice("$_[0]1:-1,1:-1");
|
my $D = $_[1]->slice("$_[0]1:-1,1:-1");
|
||||||
@ -87,13 +92,13 @@ register "gouge_contrast",
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
register "gouge_edge",
|
register "edge_detect_2x2",
|
||||||
"detect edges in an image using the gouge algorithm",
|
"detects edges in an image using a fast 2x2 kernel",
|
||||||
"Detect edges in the image using a fast algorithm found in a paper by James O. Gouge. It is similar to Sobel, yet sharper.",
|
"Detect edges in the image using a 2x2 kernel. It is similar to Sobel, yet sharper (and lower qwuality).",
|
||||||
"Marc Lehmann",
|
"Marc Lehmann",
|
||||||
"Marc Lehmann <pcg\@goof.com>",
|
"Marc Lehmann <pcg\@goof.com>",
|
||||||
"19990723",
|
"19990725",
|
||||||
"<Image>/Filters/Edge-Detect/Gouge",
|
"<Image>/Filters/Edge-Detect/2x2 Edge Detect",
|
||||||
"RGB*, GRAY*",
|
"RGB*, GRAY*",
|
||||||
[],
|
[],
|
||||||
sub {
|
sub {
|
||||||
@ -101,7 +106,7 @@ register "gouge_edge",
|
|||||||
my $bpp = 3-!!($drawable->gray);
|
my $bpp = 3-!!($drawable->gray);
|
||||||
|
|
||||||
iterate $drawable,
|
iterate $drawable,
|
||||||
"Gouge edge detection...",
|
"2x2 cross gradient...",
|
||||||
sub {
|
sub {
|
||||||
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
|
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
|
||||||
my $R = $_[1]->slice("$_[0]1:-1,0:-2");
|
my $R = $_[1]->slice("$_[0]1:-1,0:-2");
|
||||||
|
2548
plug-ins/perl/examples/logulator
Executable file
2548
plug-ins/perl/examples/logulator
Executable file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ use PDL;
|
|||||||
|
|
||||||
register "pixelmap",
|
register "pixelmap",
|
||||||
"Maps Pixel values and coordinates through general Perl exprtessions",
|
"Maps Pixel values and coordinates through general Perl exprtessions",
|
||||||
"=pod",
|
"=pod()",
|
||||||
"Marc Lehmann",
|
"Marc Lehmann",
|
||||||
"Marc Lehmann <pcg\@goof.com>",
|
"Marc Lehmann <pcg\@goof.com>",
|
||||||
"19990528",
|
"19990528",
|
||||||
|
Reference in New Issue
Block a user