{"id":57187,"date":"2022-10-29T03:01:49","date_gmt":"2022-10-28T17:01:49","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=57187"},"modified":"2022-10-29T08:08:14","modified_gmt":"2022-10-28T22:08:14","slug":"image-conversions-via-php-gd-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-conversions-via-php-gd-primer-tutorial\/","title":{"rendered":"Image Conversions via PHP GD Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/convert_wildcard.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image Conversions via PHP GD Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/convert_wildcard.jpg\" title=\"Image Conversions via PHP GD Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Image Conversions via PHP GD Primer Tutorial<\/p><\/div>\n<p>Regular readers at this place will know about our admiration for <a target=_blank title='ImageMagick command line' href='http:\/\/www.imagemagick.org\/script\/command-line-tools.php'>ImageMagick<\/a> and its command line (&#8220;convert&#8221; for macOS and Linux and &#8220;magick.exe&#8221; for Windows) image conversion functionality.  Even so, ImageMagick is not capable of &#8230;<\/p>\n<p><code><br \/>\nconvert filespec*.*g* *.jpeg<br \/>\n<\/code><\/p>\n<p> &#8230; type of image conversion, in bulk, kind of processing <font size=1>(which <a target=_blank href='http:\/\/www.gimp.org' title='Gimp, or GIMP'>Gimp<\/a> offered with its sadly departed Bimp conversion software in the past)<\/font>.  But tailored PHP use of the <a target=_blank title='PHP GD' href='https:\/\/www.php.net\/manual\/en\/function.gd-info.php'>GD<\/a> (image manipulation) library, helped out by <font size=1>(good ol&#8217;)<\/font> PHP <a target=_blank title='PHP glob method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'>glob<\/a>, is!<\/p>\n<p>And so, we&#8217;ve written a &#8220;proof of concept&#8221; converter that you can run at the RJM Programming domain, but we&#8217;d recommend for use with an Apache\/PHP local web server like <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info'>MAMP<\/a> is!  (Two in one blog posting is a record &#8230; is!)<\/p>\n<p>Get into MAMP, and you might want to download <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/convert_wildcard.php_GETME\" title='convert_wildcard.php'>convert_wildcard.php<\/a> PHP source code to MAMP&#8217;s Document Root folder.  Else, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/convert_wildcard.php\" title=\"Click picture\">try it here<\/a> or below &#8230;<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/convert_wildcard.php\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57187' onclick='var dv=document.getElementById(\"d57187\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/download\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57187' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Regular readers at this place will know about our admiration for ImageMagick and its command line (&#8220;convert&#8221; for macOS and Linux and &#8220;magick.exe&#8221; for Windows) image conversion functionality. Even so, ImageMagick is not capable of &#8230; convert filespec*.*g* *.jpeg &#8230; &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-conversions-via-php-gd-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[85,144,263,2650,1750,360,452,1550,491,1615,590,1658,599,1807,714,744,932,997,1238,1319],"class_list":["post-57187","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-apache","tag-bimp","tag-conversion","tag-convert","tag-document-root","tag-download","tag-form","tag-gd","tag-gimp","tag-glob","tag-image","tag-imagemagick","tag-img","tag-link","tag-local-web-server","tag-mamp","tag-php","tag-programming","tag-table","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57187"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=57187"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57187\/revisions"}],"predecessor-version":[{"id":57194,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/57187\/revisions\/57194"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=57187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=57187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=57187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}