Try as I might, I can't come up with the PerlMagick equivalent of this command:
convert image.jpg -alpha set -virtual-pixel transparent -channel A -blur 0x10 -level 50%,100% +channel -background white -flatten -quantize RGB -quality 85 converted-image.jpg
Can anyone show me how to do this in PerlMagick?
convert command -> PerlMagick
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert command -> PerlMagick
What operation are you having problems with?
note -flatten is a shall API shortcut for -layers flatten
note -flatten is a shall API shortcut for -layers flatten
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: convert command -> PerlMagick
Should this:
$image->Set(alpha=>'Set');
$image->Set('virtual-pixel'=>'Transparent');
$image->Blur(geometry=>'0x10',channel=>'A');
$image->Level(levels=>'50%,100%',channel=>'A');
be the equivalent of this:
convert image.jpg -alpha set -virtual-pixel transparent -channel A -blur 0x10 -level 50%,100% +channel -background white -flatten converted-image.jpg
$image->Set(alpha=>'Set');
$image->Set('virtual-pixel'=>'Transparent');
$image->Blur(geometry=>'0x10',channel=>'A');
$image->Level(levels=>'50%,100%',channel=>'A');
be the equivalent of this:
convert image.jpg -alpha set -virtual-pixel transparent -channel A -blur 0x10 -level 50%,100% +channel -background white -flatten converted-image.jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert command -> PerlMagick
For the first part of the CLI line, yes I believe so. At least it seems right.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: convert command -> PerlMagick
Can you tell me how this is done in PerlMagick or point me in the right direction?
+channel -background white -flatten
+channel -background white -flatten
Re: convert command -> PerlMagick
The PerlMagick "-flatten" is a little different:
Code: Select all
$image = Image::Magick::Flatten( $image );
Re: convert command -> PerlMagick
Thank you, can you translate this into PerlMagick:
+channel -background white
+channel -background white