<p>Is it possible to create images with PHP (as opposed to simply linking to them via HTML) and if so, where should I go first to learn about such a thing?</p>

[{'answer_id': 25131, 'author': 'Konrad Rudolph', 'author_id': 1968, 'author_profile': 'https://Stackoverflow.com/users/1968', 'pm_score': 3, 'selected': False, 'text': '<p>Yes this is possible. I believe there are multiple libraries to accomplish this. The most widely used is probably <a href="http://www.imagemagick.org/script/index.php" rel="noreferrer">ImageMagick</a> which is actually not PHP specific but comes with appropriate bindings.</p>\n\n<p>See also in the <a href="http://php.net/imagick" rel="noreferrer">PHP documentation</a>.</p>\n'}, {'answer_id': 25133, 'author': 'Twotymz', 'author_id': 2224, 'author_profile': 'https://Stackoverflow.com/users/2224', 'pm_score': 2, 'selected': False, 'text': '<p>Check out <a href="http://us3.php.net/gd" rel="nofollow noreferrer">GD</a>.  It contains a ton of functions for image creation,manipulation and interrogation. Your PHP install just has to built with the GD library which it probably was.</p>\n'}, {'answer_id': 25138, 'author': 'AnnanFay', 'author_id': 2118, 'author_profile': 'https://Stackoverflow.com/users/2118', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://us2.php.net/manual/en/intro.image.php" rel="nofollow noreferrer">PHP GD</a></p>\n\n<p><a href="http://pear.php.net/package/Image_Canvas" rel="nofollow noreferrer">Pear Image_Canvas</a> (and <a href="http://pear.php.net/package/Image_Graph" rel="nofollow noreferrer">Image_Graph</a> for graphs)</p>\n\n<p>Those are the two I know of.</p>\n'}, {'answer_id': 25139, 'author': 'Ross', 'author_id': 2025, 'author_profile': 'https://Stackoverflow.com/users/2025', 'pm_score': 5, 'selected': True, 'text': '<p>I prefer the <a href="http://www.php.net/gd" rel="nofollow noreferrer">GD library</a> - check out <a href="http://www.php.net/manual/en/image.examples.php" rel="nofollow noreferrer">the Examples</a>, and this example:</p>\n\n<pre><code>&lt;?php\nheader ("Content-type: image/png");\n$im = @imagecreatetruecolor(120, 20)\n      or die("Cannot Initialize new GD image stream");\n$text_color = imagecolorallocate($im, 233, 14, 91);\nimagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);\nimagepng($im);\nimagedestroy($im);\n?&gt;\n</code></pre>\n\n<p>Outputs:</p>\n\n<p><a href="https://i.stack.imgur.com/kBN75.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kBN75.png" alt="imagecreatetrucolor example"></a><br>\n<sub>(source: <a href="http://uk2.php.net/manual/en/figures/image.imagecreatetruecolor.png" rel="nofollow noreferrer">php.net</a>)</sub>  </p>\n\n<p>See <a href="http://www.php.net/manual/en/function.imagecreatetruecolor.php" rel="nofollow noreferrer">imagecreatetruecolor</a>.</p>\n'}, {'answer_id': 25163, 'author': 'Edmund Tay', 'author_id': 2633, 'author_profile': 'https://Stackoverflow.com/users/2633', 'pm_score': 2, 'selected': False, 'text': '<p>For decent tutorials on image generation using PHP:</p>\n\n<p>GD - <a href="http://devzone.zend.com/node/view/id/1269" rel="nofollow noreferrer">http://devzone.zend.com/node/view/id/1269</a></p>\n\n<p>ImageMagick - <a href="http://www.sitepoint.com/article/dynamic-images-imagemagick" rel="nofollow noreferrer">http://www.sitepoint.com/article/dynamic-images-imagemagick</a></p>\n'}, {'answer_id': 871350, 'author': 'Chris Henry', 'author_id': 103315, 'author_profile': 'https://Stackoverflow.com/users/103315', 'pm_score': 0, 'selected': False, 'text': '<p>MagickWand is pretty good for that as well, and pretty powerful.</p>\n\n<p><a href="http://www.bitweaver.org/doc/magickwand/index.html" rel="nofollow noreferrer">http://www.bitweaver.org/doc/magickwand/index.html</a></p>\n\n<p>This snippet will take an image, wrie the \'rose\' in Vera, or whatever fonts are available, and flush the image to the browser.</p>\n\n<pre><code>$drawing_wand=NewDrawingWand();\nDrawSetFont($drawing_wand,"/usr/share/fonts/bitstream-vera/Vera.ttf");\nDrawSetFontSize($drawing_wand,20);\nDrawSetGravity($drawing_wand,MW_CenterGravity);\n$pixel_wand=NewPixelWand();\nPixelSetColor($pixel_wand,"white");\nDrawSetFillColor($drawing_wand,$pixel_wand);\nif (MagickAnnotateImage($magick_wand,$drawing_wand,0,0,0,"Rose") != 0) {\n    header("Content-type: image/jpeg");\nMagickEchoImageBlob( $magick_wand );\n} else {\necho MagickGetExceptionString($magick_wand);\n}\n</code></pre>\n'}, {'answer_id': 32886714, 'author': 'shekh danishuesn', 'author_id': 5291660, 'author_profile': 'https://Stackoverflow.com/users/5291660', 'pm_score': 0, 'selected': False, 'text': '<p>you can use gd library with different function of it.\nand create good image with the code</p>\n\n<pre><code>header("Content-Type: image/png");\n\n//try to create an image\n$im = @imagecreate(800, 600)\nor die("Cannot Initialize new GD image stream");\n\n//set the background color of the image\n$background_color = imagecolorallocate($im, 0xFF, 0xCC, 0xDD);\n\n//set the color for the text \n$text_color = imagecolorallocate($im, 133, 14, 91);\n\n//adf the string to the image\nimagestring($im, 5, 300, 300,  "I\'m a pretty picture:))", $text_color);\n\n//outputs the image as png\nimagepng($im);\n\n//frees any memory associated with the image \nimagedestroy($im);\n</code></pre>\n\n<p>color to Negative</p>\n\n<pre><code>if(!file_exists(\'dw-negative.png\')) {\n    $img = imagecreatefrompng(\'dw-manipulate-me.png\');\n    imagefilter($img,IMG_FILTER_NEGATE);\n    imagepng($img,\'db-negative.png\');\n    imagedestroy($img);\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/25128', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1384652/']