Newbie help with frames.

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
detatched

Newbie help with frames.

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

particularly look in the thumbnail section, on "adding fluff"
http://www.cit.gu.edu.au/~anthony/graph ... ils/#fluff
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
detatched

Post 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.
redace

Post 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\">");
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Actually 3... Commandline, MagickWand, and IMagick Pecl Extension. I just compiles PHP so all three work.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply