tags:

views:

33

answers:

0

Hi there I have some code to resize an image w/ GD and Perl

sub adjust_size {
    my ($localfile, $ext) = @_;
    # need to use truecolor option to support 24 bit colors
    $image = GD::Image->trueColor(1);
    $image = new GD::Image->new($localfile);
    my ($w, $h) = $image->getBounds();
    ...

everything works properly with RGB images. When a CMYK image is uploaded $image->getBounds() returns undefined.

According to the Perl Module I have GD lib 2.35 , which according to the change log, should handle CMYK.

The code should be relatively the same for PHP or PERL.