Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created February 26, 2010 10:28
Show Gist options
  • Save fujiwara/315610 to your computer and use it in GitHub Desktop.
Save fujiwara/315610 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Imager;
my $img = Imager->new;
$img->read( file => shift );
do {
my $transparent = Imager::Color->new( 0, 0, 0, 0 );
my $img2 = $img->copy;
$img2->circle(
color => $transparent,
r => 200,
x => 300,
y => 200,
aa => 0,
filled => 100
);
$img->compose( src => $img2, combine => "diff" );
};
$img->write( jpegquality => '100%', file => shift );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment