amacks has asked for the wisdom of the Perl Monks concerning the following question:
Use case: bulk watermarking images.
I first generate a standard overlay image:Then I composite that onto a base imagemy $text_overlay = Image::Magick->new(); $text_overlay->Set(size=>'400x140'); $text_overlay->ReadImage('xc:white'); $text_overlay->Set(alpha=>'Activate'); $text_overlay->Transparent(color=>'white'); my $err=$text_overlay->Annotate(text=>"OverlayText", 'pointsize' =>14, 'font' => 'AvantGarde-DemiOblique', 'geometry' => "+20+20", 'fill' => 'black', 'antialias' => 'true', );
The problem is that this outputs an image with the overlay as just a bunch of blocks http://www.wiglaf.org/aaronm/48572-1.jpg When I run via the convert CLI tool, it does as expectedmy $imageTool=Image::Magick->new(magick=>'JPEG'); my $image=$imageTool->read($image_filename); my $err=$imageTool->Composite( 'image' => $text_overlay, 'opacity' => '15%', 'compose' => 'Atop', 'rotate' => 5, 'tile' => 'true', );
http://www.wiglaf.org/aaronm/overlay_test.jpg$ convert -size 400x140 -font "AvantGarde-DemiOblique" -pointsize 14 - +fill black -antialias -alpha set -transparent white -annotate +20+20 +"OverlayText" xc:white white_text.png $ composite white_text.png 48572-1.jpg -tile -compose Atop -dissolve 1 +5% overlay_test.jpg
This code worked (the perl code) until sometime in the last 8-12 months, but I don't know of anything that changed on the system. Any thoughts?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PerlMagick renders text as blocks
by bliako (Abbot) on Sep 08, 2023 at 07:03 UTC | |
by Fletch (Bishop) on Sep 08, 2023 at 07:56 UTC | |
by amacks (Novice) on Oct 06, 2023 at 15:01 UTC | |
by Fletch (Bishop) on Oct 08, 2023 at 00:39 UTC | |
by Anonymous Monk on Oct 08, 2023 at 07:34 UTC | |
by choroba (Cardinal) on Oct 08, 2023 at 17:10 UTC |