Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
b7eceb69
Commit
b7eceb69
authored
Jul 27, 1999
by
Marc Lehmann
Browse files
see plug-ins/perl/Changes
parent
851475b6
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
plug-ins/perl/Changes
View file @
b7eceb69
...
...
@@ -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.
...
...
plug-ins/perl/Gimp/Pod.pm
View file @
b7eceb69
...
...
@@ -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
;
}
...
...
plug-ins/perl/MANIFEST
View file @
b7eceb69
...
...
@@ -105,4 +105,4 @@ logo.xpm
examples/frame_reshuffle
examples/frame_filter
examples/gouge
examples/logulator
plug-ins/perl/Makefile.PL
View file @
b7eceb69
...
...
@@ -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
;
...
...
plug-ins/perl/TODO
View file @
b7eceb69
...
...
@@ -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(!!!)
...
...
plug-ins/perl/examples/gouge
View file @
b7eceb69
#!/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-
P
ass 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-
p
ass filtering (smoothing) using a fast
2x2 kernel
",
"
Marc Lehmann
",
"
Marc Lehmann <pcg
\@
goof.com>
",
"
1999072
3
",
"
<Image>/Filters/Blur/
Gouge
",
"
1999072
5
",
"
<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>
",
"
1999072
3
",
"
<Image>/Filters/Enhance/Contrast
",
"
1999072
5
",
"
<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
",
"
detect
s
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>
",
"
1999072
3
",
"
<Image>/Filters/Edge-Detect/
Gouge
",
"
1999072
5
",
"
<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
");
...
...
plug-ins/perl/examples/logulator
0 → 100755
View file @
b7eceb69
This diff is collapsed.
Click to expand it.
plug-ins/perl/examples/pixelmap
View file @
b7eceb69
...
...
@@ -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
",
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment