title: Writing text to image in python 2.7 using PIL
body: <p>Edit:
  Code works however I had </p>
  
  <pre><code>draw.text((30,10), "Hello World", (255, 255, 255, 255),font=font)
  </code></pre>
  
  <p>which writes "Hello World" as white. If you change it to </p>
  
  <pre><code>draw.text((30,10), "Hello World", (255, 255, 255, 255),font=font)
  </code></pre>
  
  <p>enter code "Hello world" will be written in black.</p>
  
  <p>I have a python script that is trying to write "Hello World" onto a jpg image but when I save the file there is no text written to it, any ideas?
  I'm using python 2.7 and Pillow.</p>
  
  <p>I've also had a look at this documentation: <a href="http://pillow.readthedocs.io/en/3.1.x/reference/ImageDraw.html" rel="nofollow noreferrer">http://pillow.readthedocs.io/en/3.1.x/reference/ImageDraw.html</a></p>
  
  <p>Code:</p>
  
  <pre><code>from PIL import Image
  from PIL import ImageDraw
  from PIL import ImageFont
  
  pattern = Image.open("DANK.jpg", "r").convert('RGBA') 
  
  size = width, height = pattern.size
  draw = ImageDraw.Draw(pattern,'RGBA')
  font = ImageFont.truetype("Font.ttf", 3)
  
  draw.text((30,10), "Hello World", (255, 255, 255, 255),font=font)
  pattern.save('sample-out.jpg')
  </code></pre>
  
  <p>I've also noticed that when the image is saved the colours become gray scale, why might that be?</p>