{"id":53706,"date":"2021-10-26T03:01:30","date_gmt":"2021-10-25T17:01:30","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=53706"},"modified":"2021-10-26T12:16:51","modified_gmt":"2021-10-26T02:16:51","slug":"imagemagick-batch-image-conversion-affine-transformation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagemagick-batch-image-conversion-affine-transformation-tutorial\/","title":{"rendered":"ImageMagick Batch Image Conversion Affine Transformation Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/affine_7_shear.gif\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"ImageMagick Batch Image Conversion Affine Transformation Tutorial\" id=\"qpcimage\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/affine_5_flop.gif\" title=\"ImageMagick Batch Image Conversion Affine Transformation Tutorial\"  \/><\/a><p class=\"wp-caption-text\">ImageMagick Batch Image Conversion Affine Transformation Tutorial<\/p><\/div>\n<p>Adding onto yesterday&#8217;s <a title='ImageMagick Batch Image Conversion Primer Tutorial' href='#imbicpt'>ImageMagick Batch Image Conversion Primer Tutorial<\/a>&#8216;s &#8230;<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/imagemagick.org\/index.php'>ImageMagick<\/a>&#8216;s &#8220;mogrify&#8221; batch command image conversions by type talents &#8230; today we showcase some &#8230;<\/li>\n<li><a target=_blank href='http:\/\/imagemagick.org\/index.php'>ImageMagick<\/a>&#8216;s &#8220;mogrify&#8221; batch command image affine transformation ideas for you to play with, but also recommend and thank <a target=_blank href='http:\/\/legacy.imagemagick.org\/Usage\/distorts\/affine\/'>ImageMagick v6 Examples &#8212; Affine Matrix Transforms<\/a> for greater expertise and follow up research<\/li>\n<\/ul>\n<p> &#8230; as another layer to image manipulations, that being the application of mathematical affine transformations to that image&#8217;s content, as a means by which to &#8220;mix it up&#8221; regarding ideas like &#8230;<\/p>\n<p><code><br \/>\nsequencing ImageMagick affine transformed set of images into an animated GIF presentation, again, like yesterday, via our inhouse <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php' title='Animated GIF Creator'>Animated GIF Creator<\/a> PHP web application<br \/>\n<\/code><\/p>\n<p> &#8230; based on those iPhone Camera app and onto Photos app share Mail &#8220;Small&#8221; PNG images talked about yesterday &#8230;<\/p>\n<form target=afiframe method=GET onsubmit=\"if (document.getElementById('afsel').value != '') { document.getElementById('afiframe').style.display='block'; document.getElementById('afiframe').src='\/\/www.rjmprogramming.com.au\/Mac\/' + document.getElementById('afsel').value; return false; } return false;\" action='.\/'>\n<select onchange=\"document.getElementById('idisplay').click();\" size=8 name=afsel id=afsel><option value='im_install_png_quality_jpg.gif'>Optionally choose an ImageMagick batch mogrify PNG to JPG with Affine Transformation command below<\/option><option value='affine_1.gif'>mogrify -quality 60 -format jpg -affine .5,-.866,.5,0,0 -transform *.[pP][nN][gG]<\/option><option value='affine_2.gif'>mogrify -quality 80 -format jpg -affine .5,-.866,.866,.5,-9.134,36.248 -transform *.[pP][nN][gG]<\/option><option value='affine_3_2000_2000.gif'>mogrify -size 2000&#215;2000 -quality 80 -format jpg -affine .5,-.866,.866,.5,-9.134,36.248 -transform *.[pP][nN][gG]<\/option><option value='affine_4_2000_2000_repage.gif'>mogrify -size 2000&#215;2000 -quality 80 -format jpg -affine .5,-.866,.866,.5,-9.134,36.248 -transform +repage *.[pP][nN][gG]<\/option><option value='affine_5_flop.gif'>mogrify -quality 80 -format jpg -affine -1,0,0,1,0,0 -transform +repage *.[pP][nN][gG] -comment &#8216;flop&#8217;<\/option><option value='affine_6_flip.gif'>mogrify -quality 80 -format jpg -affine 1,0,0,-1,0,0 -transform +repage *.[pP][nN][gG] -comment &#8216;flip&#8217;<\/option><option value='affine_7_shear.gif'>mogrify -quality 80 -format jpg -affine 1,.3,0,1,0,0 -transform +repage *.[pP][nN][gG] -comment &#8216;shear&#8217;<\/option><\/select><br \/>\n<input type=submit value=Display id=idisplay style=display:none;><\/input><br \/>\n<\/form>\n<p><img name=afiframe id=afiframe style=display:block;width:100%; src=http:\/\/www.rjmprogramming.com.au\/Mac\/im_install_png_quality_jpg.gif><\/img><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/imagemagick-batch-image-conversion-affine-transformation-tutorial\/'>ImageMagick Batch Image Conversion Affine Transformation Tutorial<\/a>.<\/p-->\n<hr>\n<p id='imbicpt'>Previous relevant <a target=_blank title='ImageMagick Batch Image Conversion Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/imagemagick-batch-image-conversion-primer-tutorial\/'>ImageMagick Batch Image Conversion Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/im_install_png_quality_jpg.gif?hgfdhgf=ngdhn\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"ImageMagick Batch Image Conversion Primer Tutorial\" id=\"qpcimage\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/im_install_png_quality_jpg.jpg\" title=\"ImageMagick Batch Image Conversion Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">ImageMagick Batch Image Conversion Primer Tutorial<\/p><\/div>\n<p>You can read <a title='Gimp Batch Image Manipulation Primer Tutorial' href='#gbimpt'>Gimp Batch Image Manipulation Primer Tutorial<\/a> back in the past to read about a &#8220;what used to be&#8221; command line image manipulation &#8220;batch processing&#8221; partner to the excellent GUI <a target=_blank title='Gimp' href='http:\/\/www.gimp.org\/'>Gimp<\/a> image editor product.   Why is &#8220;batch&#8221; image editing interesting?  Well, just take the case of &#8230;<\/p>\n<ul>\n<li>iOS (iPhone or iPad) image set in Photos app &#8230;<\/li>\n<li>tap Share icon &#8230;<\/li>\n<li>tap Select icon &#8230;<\/li>\n<li>tap the relevant images to share &#8230;<\/li>\n<li>tap Mail icon &#8230;<\/li>\n<li>fill in To emailee and Subject fields &#8230;<\/li>\n<li>tap Send &#8230;<\/li>\n<li>then you are presented with the choices &#8230;\n<ol>\n<li>Small<\/li>\n<li>Medium<\/li>\n<li>Actual Size<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>And then you find out whether the Mail data size limits have been exceeded or not, and the other matter of interest is whether other apps using these images at the emailee&#8217;s end can handle the respective image sizes.  We took an interest in the reinstalling of the great <a target=_blank href='http:\/\/imagemagick.org\/index.php'>ImageMagick<\/a> product&#8217;s command line applications &#8230;<\/p>\n<ul>\n<li>convert<\/li>\n<li>mogrify<\/li>\n<\/ul>\n<p> &#8230; that latter application capable of command line &#8220;batch style&#8221; conversions between image formats (and qualities, in the case of output JPEG) &#8230; for example &#8230;<\/p>\n<p><code><br \/>\nmogrify -quality 60 -format jpg  backyardbirdcount\/*.PNG<br \/>\n<\/code><\/p>\n<p> &#8230; as a way for us picking &#8220;Medium&#8221; above related to <a target=_blank title='Citizen Science Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/citizen-science-primer-tutorial\/'>Citizen Science Primer Tutorial<\/a>&#8216;s source iPhone via iOS (iPhone) Home-and-Right-Top-buttons simultaneously (macOS is Command-Control-Shift-3) screenshotting images via (iOS) Photos app images we used to attempt to create an animated GIF via our inhouse <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/animegif\/tutorial_to_animated_gif.php' title='Animated GIF Creator'>Animated GIF Creator<\/a> PHP web application, being too much to handle as those &#8220;Medium&#8221; PNGs, but okay, after ImageMagick &#8220;mogrify&#8221; batch conversions (via above command).  And so we have three scenarios to see here (via macOS Terminal application) &#8230;<\/p>\n<table>\n<tr>\n<th>&#8220;Medium&#8221; PNG sizes &#8230;<\/th>\n<\/tr>\n<tr>\n<td>-rw-rw-r&#8211;@ 1 user  admin   949079 23 Oct 14:21 backyardbirdcount\/IMG_1544.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   587441 23 Oct 14:21 backyardbirdcount\/IMG_1545.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   593868 23 Oct 14:21 backyardbirdcount\/IMG_1546.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   248811 23 Oct 14:21 backyardbirdcount\/IMG_1547.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   264369 23 Oct 14:21 backyardbirdcount\/IMG_1548.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   345073 23 Oct 14:21 backyardbirdcount\/IMG_1549.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   638168 23 Oct 14:21 backyardbirdcount\/IMG_1550.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   697660 23 Oct 14:21 backyardbirdcount\/IMG_1551.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  1132884 23 Oct 14:21 backyardbirdcount\/IMG_1552.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   101361 23 Oct 14:21 backyardbirdcount\/IMG_1553.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   900161 23 Oct 14:21 backyardbirdcount\/IMG_1554.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   534093 23 Oct 14:21 backyardbirdcount\/IMG_1555.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   706118 23 Oct 14:21 backyardbirdcount\/IMG_1556.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   262429 23 Oct 14:21 backyardbirdcount\/IMG_1557.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   142314 23 Oct 14:21 backyardbirdcount\/IMG_1558.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   142314 23 Oct 14:21 backyardbirdcount\/IMG_1559.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin    97603 23 Oct 14:21 backyardbirdcount\/IMG_1560.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   116648 23 Oct 14:21 backyardbirdcount\/IMG_1561.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   113955 23 Oct 14:21 backyardbirdcount\/IMG_1562.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   409038 23 Oct 14:21 backyardbirdcount\/IMG_1563.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   116669 23 Oct 14:21 backyardbirdcount\/IMG_1564.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   125601 23 Oct 14:21 backyardbirdcount\/IMG_1565.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   125152 23 Oct 14:21 backyardbirdcount\/IMG_1566.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   139855 23 Oct 14:21 backyardbirdcount\/IMG_1567.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   148579 23 Oct 14:21 backyardbirdcount\/IMG_1568.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   137468 23 Oct 14:21 backyardbirdcount\/IMG_1569.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   779736 23 Oct 14:21 backyardbirdcount\/IMG_1570.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   769960 23 Oct 14:21 backyardbirdcount\/IMG_1571.PNG\n<\/td>\n<\/tr>\n<tr>\n<th>ImageMagick mogrify &#8220;Medium&#8221; PNG to JPEG 60% quality &#8230;<\/th>\n<\/tr>\n<tr>\n<td>-rw-r&#8211;r&#8211;  1 user  admin  25880 23 Oct 15:42 backyardbirdcount\/IMG_1544.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  28823 23 Oct 15:42 backyardbirdcount\/IMG_1545.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  16981 23 Oct 15:42 backyardbirdcount\/IMG_1546.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  58726 23 Oct 15:42 backyardbirdcount\/IMG_1547.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  48078 23 Oct 15:42 backyardbirdcount\/IMG_1548.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  54603 23 Oct 15:42 backyardbirdcount\/IMG_1549.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  25001 23 Oct 15:42 backyardbirdcount\/IMG_1550.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  16881 23 Oct 15:42 backyardbirdcount\/IMG_1551.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  50545 23 Oct 15:42 backyardbirdcount\/IMG_1552.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  17170 23 Oct 15:42 backyardbirdcount\/IMG_1553.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  24021 23 Oct 15:42 backyardbirdcount\/IMG_1554.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  30952 23 Oct 15:42 backyardbirdcount\/IMG_1555.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  18575 23 Oct 15:42 backyardbirdcount\/IMG_1556.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  63195 23 Oct 15:42 backyardbirdcount\/IMG_1557.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  44092 23 Oct 15:42 backyardbirdcount\/IMG_1558.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  44092 23 Oct 15:42 backyardbirdcount\/IMG_1559.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  25304 23 Oct 15:42 backyardbirdcount\/IMG_1560.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  31509 23 Oct 15:42 backyardbirdcount\/IMG_1561.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  31354 23 Oct 15:42 backyardbirdcount\/IMG_1562.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  27136 23 Oct 15:42 backyardbirdcount\/IMG_1563.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  31401 23 Oct 15:42 backyardbirdcount\/IMG_1564.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  36245 23 Oct 15:42 backyardbirdcount\/IMG_1565.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  36133 23 Oct 15:42 backyardbirdcount\/IMG_1566.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  40717 23 Oct 15:42 backyardbirdcount\/IMG_1567.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  40461 23 Oct 15:42 backyardbirdcount\/IMG_1568.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  39587 23 Oct 15:42 backyardbirdcount\/IMG_1569.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  21890 23 Oct 15:42 backyardbirdcount\/IMG_1570.jpg<br \/>\n-rw-r&#8211;r&#8211;  1 user  admin  16944 23 Oct 15:42 backyardbirdcount\/IMG_1571.jpg\n<\/td>\n<\/tr>\n<tr>\n<th>&#8220;Small&#8221; PNG sizes &#8230;<\/th>\n<\/tr>\n<tr>\n<td>-rw-rw-r&#8211;@ 1 user  admin  261455 23 Oct 14:46 IMG_1544.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  191175 23 Oct 14:46 IMG_1545.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  165294 23 Oct 14:46 IMG_1546.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  248811 23 Oct 14:46 IMG_1547.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  264369 23 Oct 14:46 IMG_1548.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  345073 23 Oct 14:46 IMG_1549.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  188451 23 Oct 14:46 IMG_1550.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  197718 23 Oct 14:46 IMG_1551.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  320042 23 Oct 14:46 IMG_1552.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  101361 23 Oct 14:46 IMG_1553.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  246993 23 Oct 14:46 IMG_1554.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  179694 23 Oct 14:46 IMG_1555.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  201494 23 Oct 14:46 IMG_1556.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  262429 23 Oct 14:46 IMG_1557.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  142314 23 Oct 14:46 IMG_1558.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  142314 23 Oct 14:46 IMG_1559.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin   97603 23 Oct 14:46 IMG_1560.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  116648 23 Oct 14:46 IMG_1561.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  113955 23 Oct 14:46 IMG_1562.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  155992 23 Oct 14:46 IMG_1563.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  116669 23 Oct 14:46 IMG_1564.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  125601 23 Oct 14:46 IMG_1565.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  125152 23 Oct 14:46 IMG_1566.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  139855 23 Oct 14:46 IMG_1567.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  148579 23 Oct 14:46 IMG_1568.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  137468 23 Oct 14:46 IMG_1569.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  217599 23 Oct 14:46 IMG_1570.PNG<br \/>\n-rw-rw-r&#8211;@ 1 user  admin  210131 23 Oct 14:46 IMG_1571.PNG\n<\/td>\n<\/tr>\n<\/table>\n<p>We <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/im_install_png_quality_jpg.gif\" title=\"Click picture\">show our<\/a> &#8230;<\/p>\n<ol>\n<li>reinstalling ImageMagick on macOS (for this MacBook Air) &#8230; via <a target=_blank title=HomeBrew href='http:\/\/brew.sh\/'>HomeBrew<\/a> &#8230; and <span style='cursor:pointer;' title='\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"'>also show a reinstall<\/span> of HomeBrew in the process &#8230; via &#8230;<br \/>\n<code><br \/>\nbrew install imagemagick<br \/>\nbrew install ghostscript<br \/>\n<\/code>\n<\/li>\n<li>make the image set smaller in size via ImageMagick mogrify command &#8230;<br \/>\n<code><br \/>\nmogrify -quality 60 -format jpg  backyardbirdcount\/*.PNG<br \/>\n<\/code>\n<\/li>\n<li>show resultant image sets to show that the quality reduction was not bad (and also helped us create <a target=_blank title='Citizen Science Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/citizen-science-primer-tutorial\/'>Citizen Science Primer Tutorial<\/a>&#8216;s animated GIF presentation)<\/li>\n<\/ol>\n<p>Interesting, huh?!<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/imagemagick-batch-image-conversion-primer-tutorial\/'>ImageMagick Batch Image Conversion Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gbimpt'>Previous relevant <a target=_blank title='Gimp Batch Image Manipulation Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/gimp-batch-image-manipulation-primer-tutorial\/'>Gimp Batch Image Manipulation Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Gimp Batch Image Manipulation Primer Tutorial\" id=\"qpcimage\" src=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/Gimp_Bimp_Primer.jpg\" title=\"Gimp Batch Image Manipulation Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Gimp Batch Image Manipulation Primer Tutorial<\/p><\/div>\n<p>Gimp is a great graphics editor with a huge number of methods to subtlely or not so subtlely adjust your images, no matter where they have come from (some of today&#8217;s came from Mac OS X screen captures via the Grab application and some came from a digital camera).<\/p>\n<p><script type='text\/javascript'> var qpcimageo = null; setInterval(eatAtQJoes, 5000); function eatAtQJoes() { if (qpcimageo == null) { qpcimageo = document.getElementById('qpcimage'); } var aminus=qpcimageo.src.split(\"-\");  var qn=aminus[aminus.length - 1];  var qnext = eval(qn.replace('of.jpg', '')); qnext=eval(1 + qnext);   if (qnext >= 57) { qnext = 20; } else if (qnext == 24 || qnext == 25) { qnext = 26; }  else if (qnext == 38) { qnext = 39; }   qn = aminus[0] + \"-\" + qnext + \"of.jpg\"; qpcimageo.src=qn; } <\/script><\/p>\n<p>Gimp has a great and practical way to manipulate a batch of files to perform the task to this series of photographs.  This could be especially useful for website imagery work.<\/p>\n<p>In today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/\">tutorial<\/a> you see one batch run changing the images to black and white and another to change the size of a series of photographs (to a smaller size than the huge size they come out of the digital camera (ie. more suited to website usage)) and add a text watermark in the top left hand corner.<\/p>\n<p>Here is some downloadable PHP that helps out (after) the second batch approach to show up to six of the resized images at a time and change these images over time, and you could call it <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/CuteButtons.php_GETME\" title='CuteButtons.php'>CuteButtons.php<\/a> &#8230; this PHP arrangement (it is possible to do this same functionality just with Javascript, but is maybe easier to achieve in PHP, as well as there being methods like <i><a target=_blank href='http:\/\/www.w3schools.com\/php\/func_filesystem_file_exists.asp' title='PHP file_exists'>file_exists<\/a><\/i> and <i><a target=_blank href='http:\/\/www.w3schools.com\/php\/func_filesystem_file_get_contents.asp' title='PHP file_get_contents'>file_get_contents<\/a><\/i> and <i><a target=_blank href='http:\/\/www.w3schools.com\/php\/func_filesystem_copy.asp' title='PHP copy'>copy<\/a><\/i> which are things (client-side) Javascript will never be able to do (well, maybe first of three in a clunky way)) is generic in the sense that there are hardcoded image names, but they can be overridden by using get parameters image1, image2, image3 etcetera etcetera etcetera &#8230; <br \/>eg. <a target=_blank title='http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/CuteButtons.php?image1=http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLook.jpg&#038;image2=http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLok.jpg' href='http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/CuteButtons.php?image1=http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLook.jpg&#038;image2=http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLok.jpg'>http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/CuteButtons.php?image1 =http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLook.jpg&#038;image2 =http:\/\/www.rjmprogramming.com.au\/GIMP\/iPhoto\/NLok.jpg<\/a><\/p>\n<p>The Gimp of this tutorial is on a Mac laptop using Mac OS X 10.9.2 Mavericks.   A curious thing happened with trying to get Batch Image Manipulation to work.   It worked to a point but, initially, wouldn&#8217;t accept images when clicking the &#8220;Add image files&#8221; button.   Read somewhere that this is less likely to happen when installing via <a target=_blank href='http:\/\/www.macports.org\/' title='MacPorts home page'>MacPorts<\/a> (presumably via <i>port install gimp<\/i>) but I installed via the <a target=_blank title='Gimp' href='http:\/\/gimp.org'>Gimp website<\/a>.  Am not sure that it was all a coincidence, or was a dream, but seem to remember what made Gimp&#8217;s Batch Image Manipulation functionality to fully start working, was an &#8220;out there&#8221; idea I tried that was to download the <a target=_blank title='Thanks to http:\/\/www.alessandrofrancesconi.it for this' href='http:\/\/www.alessandrofrancesconi.it\/projects\/bimp\/gimp-plugin-bimp.zip'>gimp-plugin-bimp.zip<\/a> in which there was a Windows bimp.exe (Gimp <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Plug-in_(computing)' title='Wikipedia information regarding plug-in ... thanks'>plugin<\/a>), which I ran on Mac using the Terminal application&#8217;s Bash environment&#8217;s command <a target=_blank title='Wine on Mac OS X' href='http:\/\/sourceforge.net\/projects\/darwine\/'>wine<\/a> via <i>wine bimp.exe<\/i> (we installed wine here via MacPorts <i>port install wine<\/i> and talked about wine with <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7498' title='Wine for Windows on Mac Primer Tutorial'>Wine for Windows on Mac Primer Tutorial<\/a>).   Just thought I&#8217;d mention this in case it helps somebody.  My theory for the turn around is that this may have written something good to a configuration file (even before it failed to run (as you&#8217;d expect) with various Windows graphics libraries not loading).<\/p>\n<p>Gimp&#8217;s Batch Image Manipulation (bimp) runs as a new application (as you can see in the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Bimp\/\">tutorial<\/a>), as you might expect would happen for (my favourite) <a target=_blank href='http:\/\/xquartz.macosforge.org\/' title='XQuartz ... formerly Xwindows'>XQuartz<\/a> (formerly XWindows (see  a future <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7579' title='XWindows Primer Tutorial'>XWindows Primer Tutorial<\/a> for more information here)) type of program (as Gimp is).<\/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='#d7981' onclick='var dv=document.getElementById(\"d7981\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Gimp\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7981' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d53696' onclick='var dv=document.getElementById(\"d53696\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/tag\/imagemagick\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d53696' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d53706' onclick='var dv=document.getElementById(\"d53706\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/tag\/affine\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d53706' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Adding onto yesterday&#8217;s ImageMagick Batch Image Conversion Primer Tutorial&#8216;s &#8230; ImageMagick&#8216;s &#8220;mogrify&#8221; batch command image conversions by type talents &#8230; today we showcase some &#8230; ImageMagick&#8216;s &#8220;mogrify&#8221; batch command image affine transformation ideas for you to play with, but also &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/imagemagick-batch-image-conversion-affine-transformation-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,20,29,30,37],"tags":[3836,1714,96,135,3833,183,234,263,2650,319,380,418,425,2223,2224,571,590,3137,1658,611,626,631,662,2178,738,3835,1725,2042,1897,1776,1133,1137,3837,2272,3834,1252,1299,1319],"class_list":["post-53706","post","type-post","status-publish","format-standard","hentry","category-elearning","category-ios","category-operating-system","category-photography","category-tutorials","tag-actual-size","tag-affine","tag-application","tag-batch","tag-brew","tag-camera","tag-command-line","tag-conversion","tag-convert","tag-desktop","tag-email","tag-file","tag-file-size","tag-flip","tag-flop","tag-homebrew","tag-image","tag-image-editor","tag-imagemagick","tag-install","tag-ios","tag-iphone","tag-jpeg","tag-macos","tag-mail","tag-medium","tag-photos","tag-png","tag-quality","tag-screenshot","tag-share","tag-sharing","tag-shear","tag-size","tag-small","tag-terminal","tag-transformation","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/53706"}],"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=53706"}],"version-history":[{"count":12,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/53706\/revisions"}],"predecessor-version":[{"id":53721,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/53706\/revisions\/53721"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=53706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=53706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=53706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}