Page 1 of 1

Padding the image from border

Posted: 2011-01-22T14:03:42-07:00
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!

Re: Padding the image from border

Posted: 2011-01-22T14:19:18-07:00
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

Re: Padding the image from border

Posted: 2011-01-22T14:32:02-07:00
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!

Re: Padding the image from border

Posted: 2011-01-22T15:43:33-07:00
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