<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/imagemagick">
  <channel>
    <title>ImageMagick</title>
    <link>https://www.linuxjournal.com/tag/imagemagick</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Easy Watermarking with ImageMagick</title>
  <link>https://www.linuxjournal.com/content/easy-watermarking-imagemagick</link>
  <description>  &lt;div data-history-node-id="1338469" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/11609f4.jpg" width="550" height="402" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/dave-taylor" lang="" about="https://www.linuxjournal.com/users/dave-taylor" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Dave Taylor&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
Let's start with some homework. Go to Google (or Bing) and search
for "privacy is dead, get over it". I first heard this from Bill
Joy, cofounder of Sun Microsystems, but it's attributed to a number of
tech folk, and there's an element of truth to it. Put something on-line
and it's in the wild, however much you'd prefer to keep it under
control.
&lt;/p&gt;

&lt;p&gt;
Don't believe it? Ask musicians or book authors or film-makers. Now,
whether the people who would download a 350-page PDF instead of paying $14
for a print book are hurting sales, that's another question entirely,
but the Internet is public and open, even the parts that we wish
were not.
&lt;/p&gt;

&lt;p&gt;
This means if you're a photographer or upload images
you'd like to protect or control, you have a difficult task ahead of
you. Yes, you can add some code to your Web pages that makes it impossible
to right-click to save the image, but it's impossible to shut
down theft of intellectual property completely in the on-line
world.
&lt;/p&gt;

&lt;p&gt;
This is why a lot of professional photographers don't post images
on-line that are bigger than low-resolution thumbnails. You can imagine
that
wedding photographers who make their money from selling prints (not shooting
the wedding) pay very close attention to this sort of thing!
&lt;/p&gt;

&lt;p&gt;
Just as people have learned to accept poor video in the interest of candor
and funny content thanks to YouTube, so have people also learned to accept
low-res images for free rather than paying even a nominal fee for license
rights and a high-res version of the photograph or other artwork.
&lt;/p&gt;

&lt;p&gt;
There is another way, however, that's demonstrated by the stock
photography companies on-line: watermarking.
&lt;/p&gt;

&lt;p&gt;
You've no doubt seen photos with embedded copyright notices, Web site
addresses or other content that mars the image but makes it considerably
harder to separate it from its original source.
&lt;/p&gt;

&lt;p&gt;
It turns out that our friend ImageMagick is terrific at creating these
watermarks in a variety of different ways, and that's what I
explore in this column. It's an issue for a lot of content
producers, and I know the photos I upload constantly are being ripped
off and reused on other sites without permission and without acknowledgement. 
&lt;/p&gt;

&lt;p&gt;
To do this, the basic idea is to create a watermark-only file and then blend
that with the original image to create a new one.
Fortunately, creating the new image can be done programmatically with the
&lt;code&gt;convert&lt;/code&gt; program included as part of ImageMagick.
&lt;/p&gt;

&lt;p&gt;
Having said that, it's really mind-numbingly complex, so I'm going
to start with a fairly uninspired but quick way to add a watermark using
the &lt;code&gt;label:&lt;/code&gt; feature. In a nutshell, you specify what text you want,
where you want it on the image, the input image filename and the output
image filename.
Let's start with an image (Figure 1).
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/easy-watermarking-imagemagick" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Wed, 29 Oct 2014 20:02:58 +0000</pubDate>
    <dc:creator>Dave Taylor</dc:creator>
    <guid isPermaLink="false">1338469 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Image Manipulation with ImageMagick</title>
  <link>https://www.linuxjournal.com/content/image-manipulation-imagemagick</link>
  <description>  &lt;div data-history-node-id="1335669" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/logo%20%282%29.jpg" width="123" height="118" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/dave-taylor" lang="" about="https://www.linuxjournal.com/users/dave-taylor" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Dave Taylor&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
I've spent a lot of time in my column talking about text processing and
analysis, with the basic assumption that if you're using the command line,
you're focused on text. That's not always true, and if you work with
images at all—whether JPEG, PNG, GIF or another format—there's a
free-to-download suite of image-related utilities available that offers
rather amazing capabilities direct from the command line and, therefore, also
from within shell scripts.
&lt;/p&gt;

&lt;p&gt;
I'm talking about ImageMagick, a set of programs that has grown and
expanded through the years and now includes powerful Perl and Ruby
interfaces too.
But, pshaw! We don't need no stinkin' Perl or Ruby. We'll stick
with our hard-core shell commands, thank you very much.
&lt;/p&gt;

&lt;p&gt;
You'll find a downloadable binary and source both at
&lt;a href="http://www.imagemagick.org"&gt;http://www.imagemagick.org&lt;/a&gt;, and as always, I recommend you download source
and compile it on your system if you can. It's far more reliable than hoping
someone else's compiled version is optimized for your own hardware
configuration.
&lt;/p&gt;

&lt;p&gt;
A variety of different commands are included with the ImageMagick
distribution that I divide into "analysis" and
"editing"
tools. For this article, let's stick with the analysis tools. Let me
start by showing you how much more information it offers on a typical image
file than the standard Linux command line.
&lt;/p&gt;

&lt;h3&gt;
Analyzing Images for Non-Optimized Resolutions&lt;/h3&gt;

&lt;p&gt;
If you've been using Linux for even a short time, you've probably
learned about the &lt;code&gt;file&lt;/code&gt; command. It can be helpful with some
file types:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
$ file wp-content.tar.gz
wp-content.tar.gz: gzip compressed data, from Unix
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;
But, the command is generally useless with images:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
$ file pvp.jpg
pvp.jpg: JPEG image data, EXIF standard
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;
Um, what about image size? How about any useful info at all? Jeez.
&lt;/p&gt;

&lt;p&gt;
Enter the ImageMagick &lt;code&gt;identify&lt;/code&gt; command:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
$ identify pvp.jpg
pvp.jpg JPEG 970x311 DirectClass 114kb 0.010u 0:01
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;
Ahh...so this particular image has the dimensions (the suite refers to
dimensions as the "geometry" of the image) of 970x311. That's
useful.
&lt;/p&gt;

&lt;p&gt;
Do you want even more information though? The &lt;code&gt;-verbose&lt;/code&gt; option spits out a
somewhat overwhelming amount of data:

&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/image-manipulation-imagemagick" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 17 Apr 2014 17:46:10 +0000</pubDate>
    <dc:creator>Dave Taylor</dc:creator>
    <guid isPermaLink="false">1335669 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
