36 $cmd .=
' ( +clone -threshold -1 ' ;
37 $cmd .=
"-draw \"fill black polygon 0,0 0,$i $i,0 fill white circle $i,$i $i,0\" ";
38 $cmd .=
'( +clone -flip ) -compose Multiply -composite ';
39 $cmd .=
'( +clone -flop ) -compose Multiply -composite ';
40 $cmd .=
') +matte -compose CopyOpacity -composite ' ;
52 $top = $top > 0 ?
'+' . $top : $top;
53 $left = $left > 0 ?
'+' . $left : $left;
56 $cmd .=
' -page '.$top.$left.
' "' . $p->
getSource().
'"' ;
57 $cmd .=
' -matte ( +clone -background "'. $color .
'" -shadow '. $transparency.
'x4+'.$offset.
'+'.$offset.
' ) +swap ';
58 $cmd .=
' -background none -mosaic ';
70 list ($w, $h) = $p->getInfo($p->
getSource());
76 $cmd .=
'( +clone -background "'.$color.
'" -shadow '.$transparency.
'x'.$offset.
'-'.($offset/4).
'+'.($offset/4).
' ) +swap -background none -layers merge +repage ';
97 $cmd .=
' -bordercolor "'. $borderColor.
'" -border 6 -bordercolor grey60 -border 1 -background "none" -rotate '. $rotate .
' -background black ( +clone -shadow 60x4+4+4 ) +swap -background "'. $background.
'" -flatten';
116 function polaroid(
phmagick $p, $format = null, $rotation= 6, $borderColor=
"snow", $shaddowColor =
"black", $background=
"none"){
120 if (get_class($format) ==
'phMagickTextObject' ){
132 if ($format->background !==
false)
133 $cmd .=
' -background "' . $format->background .
'"';
135 if ($format->color !==
false)
136 $cmd .=
' -fill "' . $format->color .
'"' ;
138 if ($format->font !==
false)
139 $cmd .=
' -font ' . $format->font ;
141 if ($format->fontSize !==
false)
142 $cmd .=
' -pointsize ' . $format->fontSize ;
144 if ($format->pGravity !==
false)
145 $cmd .=
' -gravity ' . $format->pGravity ;
147 if ($format->pText !=
'')
148 $cmd .=
' -set caption "' . $format->pText .
'"';
150 $cmd .=
' -bordercolor "'. $borderColor.
'" -background "'.$background.
'" -polaroid ' . $rotation .
' -background "'. $background.
'" -flatten ';
163 $cmd .=
' -bordercolor "'. $borderColor.
'" -border ' . $borderSize;