1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/opt/bin/perl
# Revision 1.0: Released it
# 1.1: Marc Lehman added undo capability! <pcg@goof.com>
# 1.2: Added my email, and put it in "Noise" where it belongs
# <sjburges@gimp.org>
# 1.3: changed undo grouping to be 1.3.24+ compatible
use Gimp;
use Gimp::Fu;
register "feedback",
"Take an image and feed it back onto itself multiple times",
"This plug-in simulates video feedback. It makes for kinda a neat desktop if you're into that sort of thing",
"Seth Burgess",
"Seth Burgess <sjburges\@gimp.org>",
"2-15-99",
N_"<Image>/Filters/Noise/Feedback...",
"RGB, GRAY",
[
[PF_SLIDER, "offset", "the amount the frames will offset", 3, [0, 255, 1]],
[PF_SLIDER, "repeat", "the number of times to repeat the illusion", 3, [0, 100, 1]],
],
sub {
my($img,$drawable,$offset,$repeat)=@_;
eval { $img->undo_group_start };
for (; $repeat>0; $repeat--) {
$drawable = $img->flatten;
$copylayer = $drawable->copy(1);
$img->add_layer($copylayer,0);
$copylayer->scale($img->width - $offset, $img->height - $offset, 0);
}
$img->flatten;
eval { $img->undo_group_end };
return();
};
exit main;
=head1 LICENSE
Copyright Seth Burgess.
Distrubuted under the same terms as Gimp-Perl.
=cut
|