{"id":280205,"date":"2016-10-31T14:45:02","date_gmt":"2016-10-31T11:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280205"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280205","title":{"rendered":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f10\/946\/95e\/f1094695ef494e78803a01d31ab82dc2.jpg\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">$generator = new imgGenerator(); $textGenerator=new imgTextGenerator(); $textGeneratorTop=new imgTextGenerator();  $label=$textGeneratorTop \t-&gt;seTextShadow(&quot;#000000&quot;, 75, 1, 2, 2) \t-&gt;setText(&quot;Test Site&quot;,&quot;#ffffff&quot;,imgGenerator::position_center_top,&quot;1\/12&quot;,0 ) \t-&gt;setBackground(&quot;#000000&quot;,'3%') \t-&gt;setFont(DR.&quot;\/upload\/fonts\/fonts2_7\/hinted-PTF55F.ttf&quot;);  $text=$textGenerator \t-&gt;seTextShadow(&quot;#000000&quot;, 75, 1, 2, 2) \t-&gt;setText(&quot;\u041c\u043e\u0440\u043a\u043e\u0432\u044c \u043a\u0430\u043a \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0430&quot;,&quot;#ffffff&quot;,imgGenerator::position_center_center,&quot;1\/7&quot;,array(0,'5%',0,'5%')) \t-&gt;setFont(DR.&quot;\/upload\/fonts\/fonts2_7\/hinted-PTF55F.ttf&quot;);  $generator \t-&gt;addText($text) \t-&gt;addText($label) \t-&gt;fromImg($_SERVER[&quot;DOCUMENT_ROOT&quot;] . &quot;\/upload\/dynamic\/2016-08\/15\/carrot-big.jpg&quot;) \t-&gt;resizeFor(&quot;autodetect&quot;) \t-&gt;addOverlay(0.5,&quot;#000000&quot;) \t-&gt;show();<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0446. \u0441\u0435\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u0441\u0430\u0439\u0442\u044b \u2014 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a7f\/8b2\/4e4\/a7f8b24e457e46fc9288b74a908a2eab.jpg\"\/><\/div>\n<\/div>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 PHP, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f Imagick. \u041f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 GD2 \u0447\u0442\u043e-\u0442\u043e \u044f \u043d\u0435 \u0440\u0435\u0448\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\u0411\u0435\u0440\u0435\u043c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u043b\u0438 \u0446\u0432\u0435\u0442<\/li>\n<li>\u0423\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430<\/li>\n<li>\u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u0435\u0440\u0445\u0443 \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0444\u043e\u043d<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u043e\u0442\u0438\u043f<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0434\u043f\u0438\u0441\u044c<\/li>\n<li>\u041a\u0435\u0448\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a>\u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432, \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u044f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/Vallefor\/evaSocialImgGenerator\">\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 Github<\/a>.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u0443<\/h2>\n<p>  \u041e\u0441\u043d\u043e\u0432\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0438\u0437 \u0446\u0432\u0435\u0442\u0430, \u043b\u0438\u0431\u043e \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438. \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0421\u043e\u0437\u0434\u0430\u0435\u043c Imagick \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438:<\/p>\n<pre><code class=\"php\">$this-&gt;im = new \\Imagick($this-&gt;opts[&quot;img&quot;]);<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0446\u0432\u0435\u0442\u0430:<\/p>\n<pre><code class=\"php\">$this-&gt;im = new \\Imagick(); $this-&gt;im-&gt;newImage(100,100,$this-&gt;opts[&quot;color&quot;]);<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0423\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c<\/h2>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0438 \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a Imgick \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c \u043d\u0435 \u0443\u043c\u0435\u0435\u0442, \u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"php\">$oldGeometry=$im-&gt;getImageGeometry(); $max=max($this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;],$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;]); if($max==$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;]) { \t$otn=$oldGeometry[&quot;height&quot;]\/$oldGeometry[&quot;width&quot;]; \t$width=$max; \t$height=$max*$otn;     if($height-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;] &lt; 0) { \t\t$height=$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;]; \t\t$width=$height\/$otn; \t\t$x=($width-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;])\/2; \t} else { \t\t$x = 0; \t} \tif($position==imgGenerator::position_center_center) { \t\t$y=($height-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;])\/2; \t} } else { \t$otn=$oldGeometry[&quot;width&quot;]\/$oldGeometry[&quot;height&quot;]; \t$height=$max; \t$width=$max*$otn; \tif($width-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;] &lt; 0) { \t\t$width=$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;]; \t\t$height=$width\/$otn; \t\t$y=($width-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;])\/2; \t} else { \t\t$y = 0; \t} \tif($position==imgGenerator::position_center_center) { \t\t$x=($width-$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;])\/2; \t} } $im-&gt;resizeImage($width,$height,\\Imagick::FILTER_LANCZOS,1,false); $im-&gt;cropimage($this-&gt;opts[&quot;resize_and_crop&quot;][&quot;width&quot;],$this-&gt;opts[&quot;resize_and_crop&quot;][&quot;height&quot;],$x,$y); <\/code><\/pre>\n<p>  \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u043e\u0446. \u0441\u0435\u0442\u0438 \u0431\u044b\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a\u0438\u043c\u0438:  <\/p>\n<table>\n<tr>\n<td>Facebook<\/td>\n<td>1200&#215;630<\/td>\n<\/tr>\n<tr>\n<td>Twitter<\/td>\n<td>978&#215;511<\/td>\n<\/tr>\n<tr>\n<td>Google+<\/td>\n<td>2120&#215;1192 (\u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c!)<\/td>\n<\/tr>\n<tr>\n<td>\u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435<\/td>\n<td>537&#215;240<\/td>\n<\/tr>\n<tr>\n<td>\u041e\u0434\u043d\u043e\u043a\u043b\u0430\u0441\u043d\u0438\u043a\u0438<\/td>\n<td>780&#215;585 (\u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b \u0434\u043e 780&#215;385)<\/td>\n<\/tr>\n<\/table>\n<p>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 User Agent, \u043d\u043e \u0442\u0443\u0442 \u0431\u044b\u043b\u0430 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0435 \u0432\u0441\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0441\u0432\u043e\u0435\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u0441\u0430\u0439\u0442\u0443 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 vkShare \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 User Agent. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u043e\u0433\u0434\u0430. \u042f \u043d\u0435 \u0437\u043d\u0430\u044e \u0441 \u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 VK, \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0437\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0441 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438. \u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043c \u0431\u044b\u043b vkShare.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u043f\u043e\u0441\u043b\u0435 \u0440\u044f\u0434\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 User Agent \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0441\u044f, \u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e VK.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445-\u0440\u043e\u0431\u043e\u0442\u043e\u0432:<\/p>\n<ul>\n<li>facebookexternalhit<\/li>\n<li>vkShare<\/li>\n<li>Twitterbot<\/li>\n<li>Google<\/li>\n<li>OdklBot<\/li>\n<\/ul>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u043e\u0444\u0438\u0441\u0435 \u043f\u0440\u043e\u0437\u0432\u0443\u0447\u0430\u043b \u043e\u0442 \u043c\u0435\u043d\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u041a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0441\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043a\u043b\u0430\u0441\u043d\u0438\u043a\u0430\u0445?\u00bb. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043b\u0441\u044f. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044f \u0442\u0430\u043c \u0441\u0430\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e.<\/p>\n<p>  \u041f\u043e\u043a\u0430 \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e, \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0437\u0430\u0432\u0435\u043b\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c withoutCrop, \u0441\u043c\u044b\u0441\u043b \u0435\u0433\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438 \u0441\u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0431\u0435\u0437 \u0435\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043e\u0431\u043b\u043e\u0436\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u0430, \u043a\u043d\u0438\u0433\u0438, \u0438\u0433\u0440\u044b \u0438 \u0442.\u0434.).<\/p>\n<h2>\u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0443<\/h2>\n<p>  <\/p>\n<pre><code class=\"php\">$geometry=$this-&gt;im-&gt;getImageGeometry(); $color=new \\ImagickPixel($this-&gt;opts[&quot;overlay&quot;][&quot;color&quot;]);  $overlay-&gt;newImage($geometry[&quot;width&quot;],$geometry[&quot;height&quot;],$color); $overlay-&gt;setImageOpacity($this-&gt;opts[&quot;overlay&quot;][&quot;opacity&quot;]);<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u0430<\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043b\u043e\u0433\u043e\u0442\u0438\u043f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 25% \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0438 \u0432\u044b\u0441\u043e\u0442\u0435 \u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u043e \u0432 \u043b\u044e\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u0434 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043d\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043b\u043e\u0433\u043e, \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h2>\u041d\u0430\u0434\u043f\u0438\u0441\u044c<\/h2>\n<p>  \u042f \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u043b, \u0447\u0442\u043e \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0422\u0430\u043a \u043e\u043d\u043e \u0438 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 ImagickDraw \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0448\u0440\u0438\u0444\u0442, \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430, \u0446\u0432\u0435\u0442, \u0441\u0442\u0438\u043b\u044c, \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"php\">$draw=new \\ImagickDraw(); $draw-&gt;setFont($this-&gt;opts[&quot;big_text_font&quot;]); $draw-&gt;setFontSize($fs); $draw-&gt;setFillColor(new \\ImagickPixel($this-&gt;opts[&quot;big_text&quot;][&quot;color&quot;])); $draw-&gt;setStrokeAntialias(true); $draw-&gt;setTextAntialias(true);<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0434\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0432\u043b\u0435\u0437\u0430\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c queryFontMetrics, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043e \u0447\u0443\u0434\u043e (\u043e\u0431 \u044d\u0442\u043e\u043c \u2014 \u043d\u0438\u0436\u0435), \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<pre><code class=\"php\">function splitToLines($draw,$text,$maxWidth) { \t$ex=explode(&quot; &quot;,$text); \t$checkLine=&quot;&quot;; \t$textImage=new \\Imagick(); \tforeach ($ex as $val) { \t\tif($checkLine) { \t\t\t$checkLine.=&quot; &quot;; \t\t} \t\t$checkLine.=$val; \t\t$metrics=$textImage-&gt;queryFontMetrics($draw, $checkLine); \t\tif($metrics[&quot;textWidth&quot;]&gt;$maxWidth) { \t\t\t$checkLine=preg_replace('\/\\s(?=\\S*$)\/',&quot;\\n&quot;,$checkLine); \t\t} \t} \treturn $checkLine; }<\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"php\">$draw-&gt;setTextAlignment(\\Imagick::ALIGN_LEFT);<\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 annotation, \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u0438:<\/p>\n<pre><code class=\"php\">$draw-&gt;annotation(0, 0, $this-&gt;opts[&quot;big_text&quot;][&quot;text&quot;]);<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442 ImagickDraw \u0431\u044b\u043b \u0431\u044b \u0433\u043e\u0442\u043e\u0432 \u0438 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 Imagick, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c \u043d\u0430\u0448 \u0442\u0435\u043a\u0441\u0442, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 drawImage:<\/p>\n<pre><code class=\"php\">$textImage=new \\Imagick(); $textImage-&gt;newImage($textwidth,$textheight,&quot;none&quot;); $textImage-&gt;drawImage($draw);<\/code><\/pre>\n<p>  $textwidth $textheight \u0431\u0435\u0440\u0435\u043c \u0438\u0437 queryFontMetrics, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u041d\u043e \u043d\u0435 \u0442\u0443\u0442-\u0442\u043e \u0431\u044b\u043b\u043e. \u042d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u0440\u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0438 \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u0438\u043b\u0438 \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e, \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435. \u0422\u0435\u043a\u0441\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u0440\u0435\u0437\u0430\u043b\u0441\u044f \u0442\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0442\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0431\u044b\u043b\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431 \u043e\u043d \u0432\u043b\u0435\u0437 \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043c\u0435\u0442\u043e\u0434\u0443, \u043d\u0430 php.net \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"php\">$baseline = $metrics['boundingBox']['y2']; $textwidth = $metrics['textWidth'] + 2 * $metrics['boundingBox']['x1']; $textheight = $metrics['textHeight'] + $metrics['descender'];<\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430.<\/p>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u044f \u043d\u0438 \u0431\u0438\u043b\u0441\u044f, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0441\u043c\u044b\u0441\u043b \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043e\u0442 queryFontMetrics \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430, \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0440\u043e\u043a \u2014 \u043c\u043d\u0435 \u044d\u0442\u043e \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434: \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435 \u0441 php.net, \u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443.<\/p>\n<pre><code class=\"php\">$textIm=new \\Imagick(); $metrics=$textIm-&gt;queryFontMetrics($draw, $this-&gt;opts[&quot;big_text&quot;][&quot;text&quot;]); $baseline = $metrics['boundingBox']['y2']; $textwidth = $metrics['textWidth'] + 2 * $metrics['boundingBox']['x1']; $textheight = $metrics['textHeight'] + $metrics['descender']; $draw-&gt;annotation ($textwidth*1.3, $textheight*1.3, $this-&gt;opts[&quot;big_text&quot;][&quot;text&quot;]);<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 3 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0440\u0438\u0441\u0443\u0435\u043c \u043d\u0430 \u043d\u0435\u0439 \u043d\u0430\u0448\u0443 \u043d\u0430\u0434\u043f\u0438\u0441\u044c:<\/p>\n<pre><code class=\"php\">$textImage=new \\Imagick(); $textImage-&gt;newImage($textwidth*3,$textheight*3,&quot;none&quot;); $textImage-&gt;drawImage($draw);<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u043c \u043a\u0440\u0430\u044f, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438:<\/p>\n<pre><code class=\"php\">$textImage-&gt;trimImage(0);<\/code><\/pre>\n<p>  \u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c setImagePage, \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u0430, \u0432\u044b\u0441\u043e\u0442\u0430 \u0438 \u0448\u0438\u0440\u0438\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"php\">$textImage-&gt;setImagePage(0, 0, 0, 0);<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0422\u0435\u043d\u044c \u043f\u043e\u0434 \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/h2>\n<p>  Imagick \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043d\u044c \u0443 \u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u043e \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u043d\u044c \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438. \u041e\u043a, \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u044e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 \u0442\u0435\u043d\u044c, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043e\u0434\u043d\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435:<\/p>\n<pre><code class=\"php\">$shadow_layer = clone $textImage; $shadow_layer-&gt;setImageBackgroundColor(new \\ImagickPixel($this-&gt;opts[&quot;big_text_shadow&quot;][&quot;color&quot;])); $shadow_layer-&gt;shadowImage($this-&gt;opts[&quot;big_text_shadow&quot;][&quot;opacity&quot;], $this-&gt;opts[&quot;big_text_shadow&quot;][&quot;sigma&quot;], $this-&gt;opts[&quot;big_text_shadow&quot;][&quot;x&quot;], $this-&gt;opts[&quot;big_text_shadow&quot;][&quot;y&quot;]); $shadow_layer-&gt;compositeImage($textImage, \\Imagick::COMPOSITE_OVER, 0, 0); $textImage=clone $shadow_layer;<\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, $textImage-&gt;trimImage(0); \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0435\u043d\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u043f\u0438\u0441\u0435\u0439, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430 \u0438 \u0446\u0435\u043d\u0430.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f VK):<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e27\/1bd\/63b\/e271bd63b8cf47fbbcb76266159a4441.jpg\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c58\/16f\/2c6\/c5816f2c682c4e7698d7533006c052fb.jpg\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/194\/358\/08c\/19435808c53e40569a79b4b449917b7f.jpg\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/755\/c2f\/798\/755c2f79831c41a4acdcb6490b92858a.jpg\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/269\/ef6\/680\/269ef6680e4c4da7bf81cec609833767.jpg\" \/><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a54\/4c4\/2e6\/a544c42e676d4f80b5b9f939ad6cec35.jpg\" \/><\/div>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0434\u0435\u0439, \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u043c\u0435\u0442\u043e\u0434 setLogo \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 addImage \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043e \u043c\u043d\u0435: \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0438 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u0443\u0434\u0438\u0438. \u0412 \u043c\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 CMS, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043e \u0447\u0435\u043c \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/314018\/\"> https:\/\/habrahabr.ru\/post\/314018\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f10\/946\/95e\/f1094695ef494e78803a01d31ab82dc2.jpg\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">$generator = new imgGenerator(); $textGenerator=new imgTextGenerator(); $textGeneratorTop=new imgTextGenerator();  $label=$textGeneratorTop \t-&gt;seTextShadow(&quot;#000000&quot;, 75, 1, 2, 2) \t-&gt;setText(&quot;Test Site&quot;,&quot;#ffffff&quot;,imgGenerator::position_center_top,&quot;1\/12&quot;,0 ) \t-&gt;setBackground(&quot;#000000&quot;,'3%') \t-&gt;setFont(DR.&quot;\/upload\/fonts\/fonts2_7\/hinted-PTF55F.ttf&quot;);  $text=$textGenerator \t-&gt;seTextShadow(&quot;#000000&quot;, 75, 1, 2, 2) \t-&gt;setText(&quot;\u041c\u043e\u0440\u043a\u043e\u0432\u044c \u043a\u0430\u043a \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u0430&quot;,&quot;#ffffff&quot;,imgGenerator::position_center_center,&quot;1\/7&quot;,array(0,'5%',0,'5%')) \t-&gt;setFont(DR.&quot;\/upload\/fonts\/fonts2_7\/hinted-PTF55F.ttf&quot;);  $generator \t-&gt;addText($text) \t-&gt;addText($label) \t-&gt;fromImg($_SERVER[&quot;DOCUMENT_ROOT&quot;] . &quot;\/upload\/dynamic\/2016-08\/15\/carrot-big.jpg&quot;) \t-&gt;resizeFor(&quot;autodetect&quot;) \t-&gt;addOverlay(0.5,&quot;#000000&quot;) \t-&gt;show();<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0446. \u0441\u0435\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u0441\u0430\u0439\u0442\u044b \u2014 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a7f\/8b2\/4e4\/a7f8b24e457e46fc9288b74a908a2eab.jpg\"\/><\/div>\n<\/div>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 PHP, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f Imagick. \u041f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 GD2 \u0447\u0442\u043e-\u0442\u043e \u044f \u043d\u0435 \u0440\u0435\u0448\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\u0411\u0435\u0440\u0435\u043c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u043b\u0438 \u0446\u0432\u0435\u0442<\/li>\n<li>\u0423\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430<\/li>\n<li>\u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u0435\u0440\u0445\u0443 \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0444\u043e\u043d<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u043e\u0442\u0438\u043f<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0434\u043f\u0438\u0441\u044c<\/li>\n<li>\u041a\u0435\u0448\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/li>\n<\/ul>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-280205","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280205"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280205\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}