title: Adding one image to another with PIL on Raspberry Pi
body: <p>I am using a raspberry Pi with a camera module. I wrote a script which made the camera module take a picture.</p>
  <p>Now, after I took the picture I need a Python script which puts the recently taken picture and another picture (something like a watermark or logo) together. I tried to use this: <a href="http://pillow.readthedocs.org/en/latest/handbook/tutorial.html" rel="nofollow noreferrer">http://pillow.readthedocs.org/en/latest/handbook/tutorial.html</a>
  , but I don't know which commands or syntax I must use.</p>
  <p>EDIT:<br />
  My Python script... It takes a picture with the time.</p>
  <pre><code>from datetime import datetime
  zeit = datetime.now()
  zeit = &quot;%s-%s-%s-%s:%s:%s&quot; % (zeit.year,zeit.day,zeit.month,zeit.hour,zeit.minute,zeit.second)
  Bildformat = &quot;.png&quot;
  
  Bildname = &quot;Bild-&quot; + zeit + Bildformat
  
  from subprocess import call
  
  #call ([&quot;raspistill -o &quot; + Bildname + &quot; -t 1 -n&quot;], shell=True)
  call ([&quot;raspistill -o /home/pi/cam_project/Bilder/&quot; + Bildname + &quot; -t 1 -n&quot;], shell=True)
  </code></pre>
  <p>EDIT 2:<br />
  Thanks for your Answers. This is my whole Code. I want to add something like in the Tutorial (look at the link above). The main Idea is that the camera shoots a picture and the PIL library (see link) grabs the picture and add this recently taken picture to another picture (which I made before and this is in the same directory (Like a watermark or logo))</p>
  <p>Something like:</p>
  <pre><code>from __future__ import print_function   
  from PIL import Image
  
  img_taken = Image.open(&quot;/home/pi/cam_project/Bilder/&quot; + Bildname + &quot;&quot;)
  
  # This is the picture with the date as name 
      
  img_watermark/logo = Image.open(&quot;home/pi/cam_project/Bilder/watermark.png
      
      # This is the logo
  
  
  # Then I want something like: paste img_watermark/logo  in img_taken
  </code></pre>
  <p>If you click the link I posted above and scroll down to &quot;Rolling an Image&quot; After the code they say:</p>
  <blockquote>
  <p>For more advanced tricks, the paste method can also take a
  transparency mask as an optional argument. In this mask, the value 255
  indicates that the pasted image is opaque in that position (that is,
  the pasted image should be used as is). The value 0 means that the
  pasted image is completely transparent. Values in-between indicate
  different levels of transparency.</p>
  </blockquote>
  <hr />
  <p>As output I want the processed picture (with the logo/watermark)</p>