Commit b7eceb69 authored by Marc Lehmann's avatar Marc Lehmann
Browse files

see plug-ins/perl/Changes

parent 851475b6
......@@ -4,6 +4,8 @@ Revision history for Gimp-Perl extension.
- region functions (except data) wrongly returned transposed matrices.
Now the order of dimensions is bpp <- width <- height.
- 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
- do not try to compile gimp_personal_rc_file without gimp-1.1.
......
......@@ -40,8 +40,8 @@ sub new {
sub _cache {
my $self = shift;
my $fmt = shift;
local $^W = 0;
if (!$self->{doc}{$fmt} && $converter{$fmt}) {
local $^W = 0;
my $doc = $converter{$fmt}->($self->{path});
undef $doc if $?>>8;
undef $doc if $doc=~/^[ \t\r\n]*$/;
......@@ -66,10 +66,12 @@ sub section {
my $self = shift;
my $doc = $self->_cache('text');
($doc) = $$doc =~ /^$_[0]$(.*?)^[A-Z]/sm;
$doc =~ y/\r//d;
$doc =~ s/^\s*\n//;
$doc =~ s/[ \t\r\n]+$/\n/;
$doc =~ s/^ //mg;
if ($doc) {
$doc =~ y/\r//d;
$doc =~ s/^\s*\n//;
$doc =~ s/[ \t\r\n]+$/\n/;
$doc =~ s/^ //mg;
}
$doc;
}
......
......@@ -105,4 +105,4 @@ logo.xpm
examples/frame_reshuffle
examples/frame_filter
examples/gouge
examples/logulator
......@@ -13,6 +13,7 @@ $|=1;
perlotine randomblends innerbevel fit-text guidegrid roundrectsel
repdup centerguide stampify goldenmean triangle billboard mirrorsplit
oneliners randomart1 pixelmap glowing_steel frame_reshuffle frame_filter
logulator
);
@shebang = (map("examples/$_",@examples),
qw(Perl-Server examples/example-net.pl examples/homepage-logo.pl
......@@ -139,7 +140,7 @@ install ::
exit ; \
fi \
done ; \
$(MAKE) UNINST=0 really-install install-plugins'."
$(MAKE) UNINST=1 really-install install-plugins'."
$main::dont_embed || (cd embed && \$(MAKE) 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/
make test TEST_VERBOSE=1
plug_in (1, ,gimp_file_load
WHITE_MASK -> ADD
bugs
[DONE] * MJH: glib-config(!!!)
......
#!/usr/bin/perl
# implements some algorithms described in
# implements some algorithms described in (the otherwise very bad)
# http://www.biocomputer.com/Thesis.html
# these are all simple 2x2 kernels, fast but relatively effective
use Gimp::Feature 'pdl';
use Gimp 1.098;
use Gimp::Fu;
......@@ -28,12 +30,15 @@ sub iterate {
my $area = $bounds[2]*$bounds[3];
my $progress = 0;
use Time::HiRes 'time';
$s=time;
do {
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)));
$progress += $w*$h/$area;
Gimp->progress_update ($progress);
} while (Gimp->pixel_rgns_process ($iter));
print time-$s;
}
Gimp->progress_update (1);
......@@ -43,20 +48,20 @@ sub iterate {
();
}
register "gouge_smooth",
"smooth (low pass filter) an image using the gouge algorithm",
"Low-Pass filtering (smoothing) using a fast algorithm found in a paper by James O. Gouge.",
register "blur_2x2",
"smooth (low pass filter) an image using a fast 2x2 kernel",
"Low-pass filtering (smoothing) using a fast 2x2 kernel",
"Marc Lehmann",
"Marc Lehmann <pcg\@goof.com>",
"19990723",
"<Image>/Filters/Blur/Gouge",
"19990725",
"<Image>/Filters/Blur/2x2 Blur",
"RGB*, GRAY*",
[],
sub {
my($image,$drawable)=@_;
iterate $drawable,
"Gouge smoothing...",
"2x2 smoothing...",
sub {
($_[1]->slice("$_[0]0:-2,0:-2")+
$_[1]->slice("$_[0]1:-1,0:-2")+
......@@ -65,20 +70,20 @@ register "gouge_smooth",
};
};
register "gouge_contrast",
"contrast enhance an image using the gouge algorithm",
"Contrast Enhance an image using a fast algorithm found in a paper by James O. Gouge.",
register "contrast_enhance_2x2",
"contrast enhance an image using a fast 2x2 kernel",
"Contrast Enhance an image using a fast 2x2 kernel",
"Marc Lehmann",
"Marc Lehmann <pcg\@goof.com>",
"19990723",
"<Image>/Filters/Enhance/Contrast",
"19990725",
"<Image>/Filters/Enhance/2x2 Contrast Enhance",
"RGB*, GRAY*",
[],
sub {
my($image,$drawable)=@_;
iterate $drawable,
"Gouge contrast enhancing...",
"2x2 contrast enhancing...",
sub {
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
my $D = $_[1]->slice("$_[0]1:-1,1:-1");
......@@ -87,13 +92,13 @@ register "gouge_contrast",
};
};
register "gouge_edge",
"detect edges in an image using the gouge algorithm",
"Detect edges in the image using a fast algorithm found in a paper by James O. Gouge. It is similar to Sobel, yet sharper.",
register "edge_detect_2x2",
"detects edges in an image using a fast 2x2 kernel",
"Detect edges in the image using a 2x2 kernel. It is similar to Sobel, yet sharper (and lower qwuality).",
"Marc Lehmann",
"Marc Lehmann <pcg\@goof.com>",
"19990723",
"<Image>/Filters/Edge-Detect/Gouge",
"19990725",
"<Image>/Filters/Edge-Detect/2x2 Edge Detect",
"RGB*, GRAY*",
[],
sub {
......@@ -101,7 +106,7 @@ register "gouge_edge",
my $bpp = 3-!!($drawable->gray);
iterate $drawable,
"Gouge edge detection...",
"2x2 cross gradient...",
sub {
my $T = $_[1]->slice("$_[0]0:-2,0:-2");
my $R = $_[1]->slice("$_[0]1:-1,0:-2");
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ use PDL;
register "pixelmap",
"Maps Pixel values and coordinates through general Perl exprtessions",
"=pod",
"=pod()",
"Marc Lehmann",
"Marc Lehmann <pcg\@goof.com>",
"19990528",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment