Page 1 of 1
Newbie help with frames.
Posted: 2007-01-03T03:44:37-07:00
by detatched
Hi all, i am using wordpress postie to post images to an image gallery. im wondering how i can use image magick to automatically put frames around the image thumbs as they are generated?
i've searched around for some sort of idiots guide to imagemagick but im stumped! i know my server has it installed im just not sure how to call up commands etc to get this working.
any helpful links or just plain how to would be great!
thanks
Scott.
Posted: 2007-01-03T14:37:45-07:00
by Bonzo
I am sure there is an example of how to add custom frames here somewhere
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/
If you check out my site you can see how ImageMagick can work with php
Posted: 2007-01-03T19:12:52-07:00
by anthony
particularly look in the thumbnail section, on "adding fluff"
http://www.cit.gu.edu.au/~anthony/graph ... ils/#fluff
Posted: 2007-01-04T03:52:31-07:00
by detatched
hi guys,
thanks for the replies.
this all seems totally over my head! so imagemagick is installed in my /usr/bin/ directory. i make a php page with the command codes dropped in? i have no idea how to actually call upon these commands, i cant even seem to find any resources that explains where to actually attempt to execute them.
sorry for the silly questions though. im sure its extremely simple to do, im just having a hard time getting a kick start!
any suggestions?
thanks again
Scott.
Posted: 2007-01-04T09:37:40-07:00
by redace
detatched wrote:
this all seems totally over my head! so imagemagick is installed in my /usr/bin/ directory. i make a php page with the command codes dropped in? i have no idea how to actually call upon these commands, i cant even seem to find any resources that explains where to actually attempt to execute them.
You can place calls to imagemagick in 2 ways from within PHP.
one, with the PHP MagickWand bolt on. (requires extra install steps.)
Or you can call it via a system() call, and execute a shell level script, passing it your image file name, have the server do the frame magic on it, and then you gen the HTML to display the newly framed image.
Example:
Code: Select all
`convert "$infile" -mattecolor peru -frame 9x9+3+3 "$outfile" 2>&1`;
print ("<img src=\"$outfile\">");
Posted: 2007-01-04T17:19:54-07:00
by anthony
Actually 3... Commandline, MagickWand, and IMagick Pecl Extension. I just compiles PHP so all three work.