Skip to content

Instantly share code, notes, and snippets.

@alicraigmile
Created October 9, 2013 00:03
Show Gist options
  • Select an option

  • Save alicraigmile/6893979 to your computer and use it in GitHub Desktop.

Select an option

Save alicraigmile/6893979 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use Image::Magick;
my $image = Image::Magick->new;
$image->Set(size=>'300x300');
#$image->ReadImage('xc:white');
#$image->Set('pixel[49,49]'=>'red');
$image->Annotate( text=>'ali', font=>'Helvetica', pointsize=>20, fill=>'black', antialias=>'True', x=>40, y=>20);
my $filename = "/home/system/www/image.png";
open(IMAGE, ">$filename");
$image->Write(file=>\*IMAGE, filename=>$filename);
close(IMAGE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment