title: PIL: make image transparent on a percent scale
body: <p>How can I make <code>watermark</code> image transparent? For example, 60% transparent. I have tried with <code>putalpha</code> but seems that it's doesn't work as expected</p>
  
  <pre><code>from PIL import Image
  
  
  temp_image = Image.open('test1.jpg')
  watermark = Image.open('watermark.png')
  
  x, y = temp_image.size
  
  image_with_watermark = Image.new('RGBA', (x, y), (0, 0, 0, 0))
  image_with_watermark.paste(temp_image, (0, 0))
  image_with_watermark.paste(watermark, (0, 0), mask=watermark)
  image_with_watermark.show()
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>ok, this works, need to figure out how to set it up using %</p>
  
  <pre><code>from PIL import Image
  
  
  temp_image = Image.open('test1.jpg')
  watermark = Image.open('watermark.png')
  
  x, y = temp_image.size
  
  watermask = watermark.convert("L").point(lambda x: min(x, 50))
  watermark.putalpha(watermask)
  
  image_with_watermark = Image.new('RGBA', (x, y), (0, 0, 0, 0))
  image_with_watermark.paste(temp_image, (0, 0))
  image_with_watermark.paste(watermark, (0, 0), mask=watermark)
  image_with_watermark.show()
  </code></pre>
  
  <p>meh, quality of the watermark is very low after:</p>
  
  <pre><code>watermask = watermark.convert("L").point(lambda x: min(x, 50))
  watermark.putalpha(watermask)
  </code></pre>
  
  <p>What is the best way to achieve what I need?</p>