Hi List

I'm trying again to get flattening of multi layered PSD's to work with
the PerlMagick (aka Image::Magick).

I'm on OS X 10.4, ImageMagick 6.2.7 and Apache2/Mod_Perl 2.

On the command line I can do the following succesfully.

    convert psdtest.psd -flatten psdtest.jpg

This produces 1 jpeg.

When I try to do the same thing (with the same image) using PerlMagick
I get multiple jpegs. One for each layer.

Here's my perl magick code.

        my $image = new Image::Magick;
        open(IMAGE, $topath);
                my $err  = $image->Read(file=>\*IMAGE); warn "$err" if "$err";
        close(IMAGE);

        $image->Set('background'=>'none');
        $err = $image->Flatten(); warn "flatten: $err" if "$err";
        warn "writting to $im_master_fp";
        $err = $image->Write(filename => $im_master_fp); warn "write: $err" if 
"$err";

The output of the warnings is as follows:

    flatten: Image::Magick=ARRAY(0x1de6d1c)
    writting to /filepath/200_psdtest.jpg

So it would appear that flatten isn't actually flattening the image.
I do get jpegs, ie 200_psdtest-0.jpg, 200_psdtest-1.jpg,
200_psdtest-2.jpg but how do I get a single flattened image like on
the command line.

Baffled.

Thanks

Angie

_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to