{"id":34717,"date":"2017-12-09T03:01:09","date_gmt":"2017-12-08T17:01:09","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=34717"},"modified":"2017-12-08T20:22:46","modified_gmt":"2017-12-08T10:22:46","slug":"php-gd-image-at-pixel-level-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-gd-image-at-pixel-level-primer-tutorial\/","title":{"rendered":"PHP GD Image at Pixel Level Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP GD Image at Pixel Level Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.jpg\" title=\"PHP GD Image at Pixel Level Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">PHP GD Image at Pixel Level Primer Tutorial<\/p><\/div>\n<p>A great place to start learning about the serverside language PHP is to read the webpage <a target=_blank title='PHP GD Image library information' href='http:\/\/php.net\/manual\/en\/book.image.php'>Image Processing and GD<\/a> because PHP is great in so many ways regarding image creation and manipulation.<\/p>\n<p>The GD methods (down to the pixel level, with the first one) we use are &#8230;<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/php.net\/manual\/en\/function.imagesetpixel.php'>imagesetpixel<\/a><\/li>\n<li><a target=_blank href='http:\/\/php.net\/manual\/en\/function.imagecreatetruecolor.php'>imagecreatetruecolor<\/a><\/li>\n<li><a target=_blank href='http:\/\/php.net\/manual\/en\/function.imagecolorallocate.php'>imagecolorallocate<\/a><\/li>\n<li><a target=_blank href='http:\/\/php.net\/manual\/en\/function.imagepng.php'>imagepng<\/a><\/li>\n<\/ul>\n<p>What we parameterize is &#8230;<\/p>\n<ul>\n<li>width of image<\/li>\n<li>height of image<\/li>\n<li>density of pixels created<\/li>\n<li>size of conglomeration of pixel (rectangular &#8220;blob&#8221;)<\/li>\n<\/ul>\n<p>Today&#8217;s PHP code you can download via this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php_GETME\" title=\"pixellate.php\">pixellate.php<\/a> link and try it via this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php\" title=\"Click picture\">live run<\/a> link.  We kind of like some of the images as below &#8230;<\/p>\n<p><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=6&#038;zeroes=4'>http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=6&#038;zeroes=4<\/a><br \/>\n<iframe src='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=6&#038;zeroes=4' title='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=6&#038;zeroes=4' style='width:100%;height:610px;'><\/iframe><\/p>\n<p><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=8&#038;zeroes=2'>http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=8&#038;zeroes=2<\/a><br \/>\n<iframe src='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=8&#038;zeroes=2' title='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=890&#038;size=8&#038;zeroes=2' style='width:100%;height:610px;'><\/iframe><\/p>\n<p><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=490'>http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=490<\/a><br \/>\n<iframe src='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=490' title='http:\/\/www.rjmprogramming.com.au\/PHP\/pixellate.php?height=600&#038;width=490' style='width:100%;height:510px;'><\/iframe><\/p>\n<p>Do you feel this web application has the genericity to be a &#8220;tool&#8221;?  Spoiler alert &#8230; we think so.<\/p>\n<p>You can see this, also, at WordPress 4.1.1&#8217;s <a target=_blank title='PHP GD Image at Pixel Level Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-gd-image-at-pixel-level-primer-tutorial\/'>PHP GD Image at Pixel Level Primer Tutorial<\/a>.<\/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='#d34717' onclick='var dv=document.getElementById(\"d34717\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/gd\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d34717' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A great place to start learning about the serverside language PHP is to read the webpage Image Processing and GD because PHP is great in so many ways regarding image creation and manipulation. The GD methods (down to the pixel &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-gd-image-at-pixel-level-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,37],"tags":[224,1923,1550,2258,590,932,1918,997,1319,2257],"class_list":["post-34717","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-colour","tag-density","tag-gd","tag-height","tag-image","tag-php","tag-pixel","tag-programming","tag-tutorial","tag-width"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34717"}],"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=34717"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34717\/revisions"}],"predecessor-version":[{"id":34725,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/34717\/revisions\/34725"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=34717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=34717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=34717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}