Create placehold with text centerd measures

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Create placehold with text centerd measures

Post by myspacee »

Hello,
I've an intranet PHP site for photos/images retouching (a ghetto PicMonk3y)
In these day i'm adding the possibility to make simple images collages.

Find on internet the possibility to create on-the-fly placehold, with given colours and dimension, eg:

http://placehold.it/320x361/E0E4CC/f33fff

Can you help me to obtain a same result using IM, to return a PNG -ZIP, 16 colors, 96DPI ?

thank you for any help,
m.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Create placehold with text centerd measures

Post by GeeMack »

myspacee wrote: 2017-11-28T05:38:23-07:00Can you help me to obtain a same result using IM, to return a PNG -ZIP, 16 colors, 96DPI ?
You haven't given us your OS or the version of IM you're working with. Please make sure to always provide that to get the best replies. But without knowing more about it, if you're working from the command line on a *nix system, a basic IM command to re-create your example image might look something like this...

Code: Select all

convert -size 320x361 xc:"#E0E4CC" -gravity center -density 96 \
   -pointsize 24 -fill "#F33FFF" -annotate +0+0 "%w x %h" -colors 16 320x361.png
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Create placehold with text centerd measures

Post by myspacee »

Hello,
thank you for reply. My PHP server has a Windows ImageMagick 6.9.1-10 Q16 x86 2015-07-25 version:

Command from dos console return an error :

Code: Select all

convert -size 320x361 xc:"#E0E4CC" -gravity center -density 96 -pointsize 24 -fill "#F33FFF" -annotate +0+0 "%w x %h" -colors 16 320x361.png
convert.exe: UnableToOpenConfigureFile `type.xml' @ warning/configure.c/GetConfigureOptions/706.
Can you help me to adjust code for my server ?
(hard to repalce version on a Production server)

Thank you for any help,
m.
Post Reply