{"id":154,"date":"2011-08-29T00:04:28","date_gmt":"2011-08-28T18:34:28","guid":{"rendered":"http:\/\/atuljha.com\/blog\/?p=154"},"modified":"2011-08-29T00:04:28","modified_gmt":"2011-08-28T18:34:28","slug":"imagemagick-and-mogrify-my-command-line-tool-for-watermarking","status":"publish","type":"post","link":"https:\/\/atuljha.com\/blog\/2011\/08\/29\/imagemagick-and-mogrify-my-command-line-tool-for-watermarking\/","title":{"rendered":"ImageMagick and mogrify. : My command line tool for watermarking."},"content":{"rendered":"<p>One fine day i decided i want &#8220;watermark&#8221; on my photos too, i know am not a great photographer but just for sake i wanted one.<\/p>\n<p>I am too lazy to do anything from GUI so i searched a bit and came to know about ImageMagic and mogrify.<\/p>\n<p>I simply installed it on my ubuntu box :-<\/p>\n<p>sudo apt-get install imagemagik<\/p>\n<p>Once i had it installed i decided using same watermark for all my images which which were lying in my directory at Desktop with name &#8220;foto&#8221;<\/p>\n<p>One of the photos before watermark<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_165\" aria-describedby=\"caption-attachment-165\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-165\" title=\"before watermark\" src=\"http:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii-300x225.jpg 300w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii.jpg 720w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-165\" class=\"wp-caption-text\">before watermark<\/figcaption><\/figure>\n<p>I simply used the command :-<\/p>\n<pre>$ mogrify -font \/usr\/share\/fonts\/truetype\/freefont\/FreeSerifBoldItalic.ttf -pointsize 100 -verbose -draw \"fill red text 24,75 '@koolhead17' \" \/home\/atul\/Desktop\/foto\/*.jpg<\/pre>\n<pre>i am selecting a font, asking for verbose, drawing, filling it with red color text with mentioned size.<\/pre>\n<pre>This is how it looks after watermark :-<\/pre>\n<p><a href=\"http:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-166\" title=\"baulii\" src=\"http:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii1-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii1-300x225.jpg 300w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2011\/08\/baulii1.jpg 720w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<pre><\/pre>\n<pre>\u00a0I would highly recommend any one who is lazy as i am to give a try to imagemagik.<\/pre>\n<pre>More example and information on Imagemagik can be found at : <a title=\"http:\/\/www.imagemagick.org\/www\/mogrify.html\" href=\"http:\/\/www.imagemagick.org\/www\/mogrify.html\">http:\/\/www.imagemagick.org\/www\/mogrify.html<\/a><\/pre>\n<pre><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One fine day i decided i want &#8220;watermark&#8221; on my photos too, i know am not a great photographer but just for sake i wanted one. I am too lazy to do anything from GUI so i searched a bit and came to know about ImageMagic and mogrify. I simply installed it on my ubuntu &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/atuljha.com\/blog\/2011\/08\/29\/imagemagick-and-mogrify-my-command-line-tool-for-watermarking\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ImageMagick and mogrify. : My command line tool for watermarking.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"_links":{"self":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":10,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}