Image-JpegMinimal

 view release on metacpan or  search on metacpan

lib/Image/JpegMinimal.pm  view on Meta::CPAN

    my( $class, %options ) = @_;

    # We really need Jpeg-support
    croak "We really need jpeg support but your version of Imager doesn't support it"
        unless $Imager::formats{'jpeg'};

    $options{ jpegquality } ||= 20;
    $options{ xmax } ||= 42;
    $options{ ymax } ||= 42;

    bless \%options => $class
}

sub get_imager {
    my( $self, $file ) = @_;
    # We should check that Imager can write jpeg images
    Imager->new( file => $file )
        or croak "Couldn't read $file: " . Imager->errstr();
}

sub compress_image {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.452 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )