#!/usr/bin/perl -w
podregister {
$drawable
->become(
'Gimp::Layer'
);
$image
->undo_group_start;
Gimp::Context->
push
();
my
$midlayer
=
$drawable
->copy(TRUE);
$image
->insert_layer(
$midlayer
, 0, 0);
my
$toplayer
=
$drawable
->copy(TRUE);
$image
->insert_layer(
$toplayer
, 0, 0);
Gimp::Context->set_background(
$color
);
$toplayer
->edit_fill(FILL_BACKGROUND);
$toplayer
->set_mode(LAYER_MODE_HSL_COLOR_LEGACY);
Gimp::Context->set_background([0,0,0]);
$drawable
->edit_fill(FILL_BACKGROUND);
$amt
/= 255;
$midlayer
->noisify(1,
$amt
,
$amt
,
$amt
,
$amt
);
my
$midmask
=
$midlayer
->create_mask(0);
$midlayer
->add_mask(
$midmask
);
$midmask
->grid(
1,3,0,[0,0,0],255, 1,
$image
->height * 3,0,[0,0,0],255, 0,0,0,[0,0,0],255
);
$midmask
->gauss_iir(1.01, 1, 1);
Gimp::Context->
pop
();
$image
->undo_group_end;
return
;
};
exit
main;