{"id":2387,"date":"2018-06-12T16:26:48","date_gmt":"2018-06-12T14:26:48","guid":{"rendered":"https:\/\/www.ybierling.com\/v2\/?p=2387"},"modified":"2018-06-12T16:26:48","modified_gmt":"2018-06-12T14:26:48","slug":"php-gd-%d1%81%d0%b3%d0%b5%d0%bd%d0%b5%d1%80%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d0%be%d0%b5-%d0%b8%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b8%d0%b7%d0%be%d0%b1%d1%80","status":"publish","type":"post","link":"https:\/\/www.ybierling.com\/v2\/ru\/php-gd-%d1%81%d0%b3%d0%b5%d0%bd%d0%b5%d1%80%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%bd%d0%be%d0%b5-%d0%b8%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5-%d0%b8%d0%b7%d0%be%d0%b1%d1%80\/","title":{"rendered":"PHP GD \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 Firefox"},"content":{"rendered":"<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0434\u044f\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430 \u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u043d\u0438\u0436\u0435 \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0441 JPEG \u0432\u043c\u0435\u0441\u0442\u043e PNG, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0438\u0434\u0438\u043c\u0443\u044e \u0432 Firefox, \u043d\u043e \u043d\u0435 \u043d\u0430 Chrome.<\/p>\n<p><span class=\"\">\u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e \u043d\u0435\u044f\u0441\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/span> <span class=\"\">\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u043d\u0438\u0436\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438.<\/span><\/p>\n<p><span class=\"\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438: \u0432\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/span><\/span><\/p>\n<ul>\n<li style=\"text-align: left;\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\"><span class=\"\">\u0412\u044b\u0445\u043e\u0434 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0440\u0430\u043d\u0435\u0435<\/span><\/span><\/li>\n<li style=\"text-align: left;\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\"><span class=\"\">\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/span><\/span><\/li>\n<li style=\"text-align: left;\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\"><span class=\"\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/span><\/span><\/li>\n<li style=\"text-align: left;\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\"><span class=\"\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430<\/span><\/span><\/li>\n<\/ul>\n<blockquote>\n<figure id=\"attachment_2372\" aria-describedby=\"caption-attachment-2372\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_51-picture-kiev-ukraine-bora1.jpg-PNG-Image.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-2372\" src=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_51-picture-kiev-ukraine-bora1.jpg-PNG-Image-300x189.png\" alt=\"PHP GD generated image The image cannot be displayed because it contains errors in Firefox : Error The image cannot be displayed because in contains errors on Firefox\" width=\"300\" height=\"189\" srcset=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_51-picture-kiev-ukraine-bora1.jpg-PNG-Image-300x189.png 300w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_51-picture-kiev-ukraine-bora1.jpg-PNG-Image.png 642w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2372\" class=\"wp-caption-text\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u041e\u0448\u0438\u0431\u043a\u0430 \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 Firefox.<\/span><\/figcaption><\/figure><\/blockquote>\n<pre class=\"lang-php prettyprint prettyprinted\"><code>$stamp = imagecreatefrompng('watermark.png');\nif(!$im = imagecreatefrompng('image.png')) die('Error generating image');\n$marge_right = $marge_bottom = 10;\n$sx = imagesx($stamp);\n$sy = imagesy($stamp);\n\n$copyimage = imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));\n\nheader('Content-type: image\/png');\nif(!imagepng($im)) die('Error generating image');\nif(!imagedestroy($im)) die('Error generating image');\nif(!imagedestroy($stamp)) die('Error generating image');<\/code><\/pre>\n<h1><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u0412\u044b\u0445\u043e\u0434 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0440\u0430\u043d\u0435\u0435<\/span><\/h1>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\"><span class=\"\">\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 &#8211; \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e, \u043a\u0430\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 PHP, \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u0430 PHP end ?&gt;<\/span><\/p>\n<p><span class=\"\">\u0417\u0430\u0442\u0435\u043c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f<\/span><\/span><\/p>\n<pre class=\"lang-php prettyprint prettyprinted\"><code>foreach (getallheaders() as $name =&gt; $value) {\nheader_remove($name);\n}<\/code><\/pre>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0410 \u0442\u0430\u043a\u0436\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0435 \u0431\u044b\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c<\/span><\/p>\n<pre class=\"lang-php prettyprint prettyprinted\"><code>ob_end_clean();<\/code><\/pre>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u042d\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u0441\u043d\u043e\u0432\u0430:<\/span><\/p>\n<blockquote>\n<figure id=\"attachment_2373\" aria-describedby=\"caption-attachment-2373\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97.png\"><img decoding=\"async\" class=\"size-medium wp-image-2373\" src=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97-300x200.png\" alt=\"PHP GD generated image The image cannot be displayed because it contains errors in Firefox : Dynamically generated image using PHP\" width=\"300\" height=\"200\" srcset=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97-300x200.png 300w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97-768x511.png 768w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97-1024x681.png 1024w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97-90x60.png 90w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-16_05_23-picture-kiev-ukraine-bora1.jpg-PNG-Image-768-\u00d7-432-pixels-Scaled-97.png 1124w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2373\" class=\"wp-caption-text\"><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c PHP<\/span><\/figcaption><\/figure><\/blockquote>\n<h1><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/span><\/h1>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0415\u0441\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e PHP \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p><span class=\"\">\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 PHP \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435:<\/span><\/span><\/p>\n<pre class=\"lang-php prettyprint prettyprinted\"><code><span class=\"pln\">error_reporting<\/span><span class=\"pun\">(<\/span><span class=\"pln\">E_ALL<\/span><span class=\"pun\">);<\/span><span class=\"pln\">\nini_set<\/span><span class=\"pun\">(<\/span><span class=\"str\">'display_errors'<\/span><span class=\"pun\">,<\/span> <span class=\"str\">'1'<\/span><span class=\"pun\">);<\/span><\/code><\/pre>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u043e\u0441\u044c \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c html \u0438\u0437-\u0437\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/span><\/p>\n<h1><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/span><\/h1>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432\u0430\u043c\u0438 \u0442\u0438\u043f\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432\u0435\u0440\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c png \u0438 jpeg.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0443, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/span><\/p>\n<pre class=\"lang-php prettyprint prettyprinted\"><code>\/\/to generate png image\nheader('Content-type: image\/png');\nif(!imagepng($im)) die('Error generating image');\n\/\/to generate jpeg image\nheader('Content-type: image\/jpeg');\nif(!imagejpeg($im)) die('Error generating image');<\/code><\/pre>\n<h1><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430<\/span><\/h1>\n<p><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e phpinfo (); \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 PHP GD, \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u0430\u043a imagepng ();<\/p>\n<p><span class=\"\">\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441\u043f\u043e\u0441\u043e\u0431 \u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043b\u0438\u0431\u043e \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 PEAR, \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0432\u0435\u0431-\u0443\u0437\u0435\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<figure id=\"attachment_2371\" aria-describedby=\"caption-attachment-2371\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo.png\"><img decoding=\"async\" class=\"size-medium wp-image-2371\" src=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo-300x138.png\" alt=\"PHP GD generated image The image cannot be displayed because it contains errors in Firefox : PHP GD package details using the phpinfo() function\" width=\"300\" height=\"138\" srcset=\"https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo-300x138.png 300w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo-768x352.png 768w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo-1024x470.png 1024w, https:\/\/www.ybierling.com\/v2\/wp-content\/uploads\/2018\/06\/2018-06-12-15_54_14-phpinfo.png 1411w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2371\" class=\"wp-caption-text\"><span id=\"result_box\" class=\"\" lang=\"ru\" tabindex=\"-1\">\u0421\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u0430\u043a\u0435\u0442\u0435 PHP GD \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 phpinfo ()<\/span><\/figcaption><\/figure><\/blockquote>\n<h1><span id=\"result_box\" class=\"short_text\" lang=\"ru\" tabindex=\"-1\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/span><\/h1>\n<ul>\n<li><a href=\"http:\/\/php.net\/manual\/en\/image.examples-watermark.php\" target=\"_blank\" rel=\"noopener\">PHP : adding watermarks to images using alpha channels manual &#8211; PHP.net<\/a><\/li>\n<li><a href=\"http:\/\/php.net\/manual\/en\/function.imagepng.php\" target=\"_blank\" rel=\"noopener\">PHP : imagepng manual &#8211; PHP.net<\/a><\/li>\n<li><a href=\"http:\/\/php.net\/manual\/en\/function.ob-end-clean.php\" target=\"_blank\" rel=\"noopener\">PHP : ob_end_clean manual &#8211; PHP.net<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/845021\/how-to-get-useful-error-messages-in-php\" target=\"_blank\" rel=\"noopener\">Debugging : how to get useful error messages in PHP ? &#8211; stackoverflow.com<\/a><\/li>\n<li><a href=\"https:\/\/www.linuxquestions.org\/questions\/slackware-14\/need-php-pear-extension-gd-843536\/\" target=\"_blank\" rel=\"noopener\">Need PHP\/Pear extension GD &#8211; linuxquestions.org<\/a><\/li>\n<li><a href=\"https:\/\/www.wcifly.com\/en\/picturedisplay-kiev-ukraine-bora1.jpg\" target=\"_blank\" rel=\"noopener\">Image dynamically displayed using PHP functions &#8211; www.wcifly.com<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0434\u044f\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430 \u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u043d\u0438\u0436\u0435 \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e<\/p>\n","protected":false},"author":1,"featured_media":2372,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[590],"tags":[5877,5879,5881,5883,5885,5867,5871,5873,5865,5863,5875,5851,5859,5855,5849,5853,5857,5869,5861],"class_list":["post-2387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-ru","tag-imagejpeg-ru","tag-imagepng-ru","tag-ob_end_clean-ru","tag-php-ru","tag-php-gd-ru","tag-php-gd---","tag-php-imagejpeg----","tag-php-imagepng----","tag-php-----","tag-php----","tag-5875","tag----gd-gear","tag-5859","tag-5855","tag---firefox--","tag-5853","tag-5857","tag------firefox","tag-5861"],"_links":{"self":[{"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/posts\/2387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/comments?post=2387"}],"version-history":[{"count":1,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/posts\/2387\/revisions"}],"predecessor-version":[{"id":2390,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/posts\/2387\/revisions\/2390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/media\/2372"}],"wp:attachment":[{"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/media?parent=2387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/categories?post=2387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ybierling.com\/v2\/wp-json\/wp\/v2\/tags?post=2387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}