Skip to content

Instantly share code, notes, and snippets.

@makotoworld
Created February 9, 2010 15:26
Show Gist options
  • Save makotoworld/299310 to your computer and use it in GitHub Desktop.
Save makotoworld/299310 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Imager;
my $filename = shift;
my $img = Imager->new;
$img->read( file => $filename ) or die $img->errstr;
$img->filter( type => 'contrast', intensity => 1.3 );
$img->filter( type => "autolevels", lsat => 0.001, usat => 0.001 );
$img->filter( type => "conv", coef => [ -0.1, 1, -0.1 ] );
$img->write( file => 'out.jpg', jpegquality => 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment