Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Overlay text on images without Image::Magick

by Anonymous Monk
on Jan 13, 2015 at 19:29 UTC ( [id://1113135]=note: print w/replies, xml ) Need Help??


in reply to Overlay text on images without Image::Magick

I know Image::Magick is a popular module to modify the images.

It is, and in the past I've used it to do what you're asking (code not at hand, sorry). Why not use it? Are there issues with it that we can try to help resolve?

Did you try installing GD anyway, like the StackOverflow post you linked to suggests, and did it work or not?

A similar recent thread with some GD sample code: Adding text to an image for printing (not quite the same because there the asker prefers to generate PDFs)

  • Comment on Re: Overlay text on images without Image::Magick

Replies are listed 'Best First'.
Re^2: Overlay text on images without Image::Magick
by Anonymous Monk on Jan 13, 2015 at 19:44 UTC

    Found it! From the archives (and tested):

    use Image::Magick; my $image = Image::Magick->new; $image->Read("/tmp/test_in.jpg"); $image->Annotate( text=>"Hello, World!", font=>'sans-serif', fill=>'black', antialias=>'true', pointsize=>16, x=>10, y=>30, ); $image->Write("/tmp/test_out.png");

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1113135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-20 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found