Padding the image from border

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
vbogoev
Posts: 2
Joined: 2011-01-22T13:57:10-07:00
Authentication code: 8675308

Padding the image from border

Post by vbogoev »

Hello,

I want to set the border of the image, but the border must not be glued to the image, but to have a little distance (transperent or colored) between image and border.

Is there any way to do that?

Thanks in advance!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Padding the image from border

Post by fmw42 »

see borderImage at http://us3.php.net/manual/en/book.imagick.php

just do it twice -- one time for the first color border and thickness and the second time for the outer border and its thickness
vbogoev
Posts: 2
Joined: 2011-01-22T13:57:10-07:00
Authentication code: 8675308

Re: Padding the image from border

Post by vbogoev »

fmw42 wrote:see borderImage at http://us3.php.net/manual/en/book.imagick.php

just do it twice -- one time for the first color border and thickness and the second time for the outer border and its thickness
:) :) :) Very very thank you!!! I didn't know that I can put two borders!!!

One more question!

I want to wrap long text to many lines, is there any function to do that, or I must check the text and split manually!

Again THANK YOU for the quick response!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Padding the image from border

Post by fmw42 »

I am not an expert with iMagick, but use the command line or PHP exec function. As far as I can see the command caption: in command line will do what you want, but I don't see it in iMagick.

The only text function seems to be annotateImage. But see the examples at setTextAlignment at http://us3.php.net/manual/en/book.imagick.php
Post Reply