{"id":17723,"date":"2015-10-14T05:01:02","date_gmt":"2015-10-13T19:01:02","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=17723"},"modified":"2015-10-14T13:20:21","modified_gmt":"2015-10-14T03:20:21","slug":"image-arc-distortion-via-imagemagick-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-arc-distortion-via-imagemagick-primer-tutorial\/","title":{"rendered":"Image Arc Distortion via ImageMagick Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/arc_distort_imagemagick.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Image Arc Distortion via ImageMagick Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/arc_distort_imagemagick.jpg\" title=\"Image Arc Distortion via ImageMagick Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Image Arc Distortion via ImageMagick Primer Tutorial<\/p><\/div>\n<p><a target=_blank title='PHP ImageMagick information' href='http:\/\/php.net\/manual\/en\/book.imagick.php'>ImageMagick<\/a> is a really very very useful PHP class to manipulate image files on a web server, ours at rjmprogramming.com.au being an Apache\/PHP\/MySql web server.  That arrangement makes PHP (and the ImageMagick class) a serverside processing constituent.  It is most likely if lots of this is new to you, you will still have heard of the phrase <a target=_blank title='Client\/server information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Client\u2013server_model'>&#8220;client\/server&#8221;<\/a>.  And it&#8217;s very very likely you&#8217;ve heard of Javascript, as it is approachable right up at your own personal computer or device, and manageable and changeable, often (though ever harder with mobile devices), up at your own personal computer or device.  PHP, and ASP.Net, and Python, and Perl are more associated with the &#8220;server&#8221; in &#8220;client\/server&#8221; &#8230; sadly nobody in the world seems to be taking responsibility for the &#8220;\/&#8221; &#8230; but we digress.<\/p>\n<p>Meanwhile, back at the ranch &#8230; when you visit a website and it shows images particular to that website, these image files will be located on that domain&#8217;s web server&#8217;s file system (ours at rjmprogramming.com.au is a Linux web server file system (and what a world of wonder is Linux, but that is another story)), and a tool like ImageMagick can &#8230;<\/p>\n<ol>\n<li>read<\/li>\n<li>write<\/li>\n<li>update<\/li>\n<\/ol>\n<p> &#8230; that image, whereas &#8220;client&#8221; Javascript (and its supervisory HTML) can only, but importantly, just do that first &#8220;read&#8221; operation &#8230; without &#8220;read&#8221; of course, we wouldn&#8217;t even have a test pattern to look at (like in the early days of television).<\/p>\n<p>PHP and GD (take a look at <a target=_blank title='PHP GD and Image Functions Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-gd-and-image-functions-primer-tutorial\/'>PHP GD and Image Functions Primer Tutorial<\/a>) and ImageMagick, amongst others, probably, can involve you in all three modes of use above to enable you to write your own web applications, in our case with PHP, that can do some of those techniques, which may or may not make you gasp, that the traditional image editors like <a target=_blank title='Gimp' href='http:\/\/gimp.org'>Gimp<\/a> (often under its <a target=_blank title='Gimp Filters menu information' href='http:\/\/docs.gimp.org\/en\/gimp-filters-menu.html'>&#8220;Filters&#8221;<\/a> menu) or PhotoShop can do, with your web server images.  Normally, though, with the involvement of Gimp and PhotoShop types of image editors, it is usual to not do the work on the web server itself, but to do that image manipulation work on a laptop or workstation, that then has <a target=_blank title='File Transfer Protocol information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/File_Transfer_Protocol'>ftp<\/a> (or sftp) access to that web server, on which the image files are &#8220;uploaded&#8221; to sit there waiting for the internet world to come along and &#8220;read&#8221; (or access) them, perhaps in the form of an HTML <a target=_blank title='HTML img tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_img.asp'>img<\/a> tag in a webpage owned by the domain you are accessing in the URL you &#8230;<\/p>\n<ul>\n<li>typed into the web browser address bar<\/li>\n<li>linked to via an HTML <i>a<\/i> tag or some other <i>onclick<\/i> event of some other HTML element &#8230; the combinations of possibilities are infinite really\n<\/ul>\n<p> &#8230; but PHP ImageMagick ideas allow you to think about web application work not involving ftp in its calculations, as the image files can be &#8220;read&#8221; at the web server, manipulated and adjusted by ImageMagick &#8220;magic&#8221; &#8230; and <strike>Albuquerque<\/strike> <strike>Alla Kazam<\/strike> abracadabra &#8230; new web server image files are then written onto the file system of your web server after interfacing to you, the &#8220;client&#8221; via an HTML form element (with the same PHP) posting the user defined settings (in today&#8217;s case, the angle of distortion in degrees and an image file URL of interest) to the PHP you&#8217;ve written to make ImageMagick do its &#8230; oh no &#8230; <strike>Albuquerque<\/strike> <strike>Alla Kazam<\/strike> <strike>abracadabra<\/strike> th<strike>a<\/strike>ing.<\/p>\n<p>We have PHP serverside code to show you today with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/arc_distort_imagemagick.php_GETME\" title='arc_distort_imagemagick.php'>arc_distort_imagemagick.php<\/a> and we have a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/arc_distort_imagemagick.php\" title='Click picture'>live run<\/a> link too.  PHP may be serverside by nature, but it can be the whole box and dice, by including the clientside HTML\/Javascript code and logic, into its content.  The same cannot be said the other way around.  And that is just one of hundreds of reasons why web hosting that involves the manipulation of web server files and accessible by languages such as PHP, opens up so many possibilities for web application functionality.<\/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='#d17723' onclick='var dv=document.getElementById(\"d17723\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/category\/animation\/\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d17723' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>ImageMagick is a really very very useful PHP class to manipulate image files on a web server, ours at rjmprogramming.com.au being an Apache\/PHP\/MySql web server. That arrangement makes PHP (and the ImageMagick class) a serverside processing constituent. It is most &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/image-arc-distortion-via-imagemagick-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":[85,213,355,427,469,491,576,590,1658,652,707,827,1715,932,997,1129,1319,1343,1411],"class_list":["post-17723","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-apache","tag-clientserver","tag-domain","tag-file-system","tag-ftp","tag-gimp","tag-html","tag-image","tag-imagemagick","tag-javascript","tag-linux","tag-mysql","tag-photoshop","tag-php","tag-programming","tag-sftp","tag-tutorial","tag-upload","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17723"}],"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=17723"}],"version-history":[{"count":14,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17723\/revisions"}],"predecessor-version":[{"id":17751,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/17723\/revisions\/17751"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=17723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=17723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=17723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}