Page 1 of 1

Create placehold with text centerd measures

Posted: 2017-11-28T05:38:23-07:00
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.

Re: Create placehold with text centerd measures

Posted: 2017-11-28T09:40:05-07:00
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

Re: Create placehold with text centerd measures

Posted: 2017-11-29T03:12:14-07:00
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.