fork(1) download
  1. import Image, ImageDraw, ImageFont, sys
  2.  
  3. dimensions = (400, 200)
  4. img = Image.new("RGB", dimensions)
  5.  
  6. # text
  7. font = ImageFont.truetype("/usr/local/share/fonts/UbuntuMono-B.ttf", 50)
  8. font2 = ImageFont.truetype("/usr/local/share/fonts/UbuntuMono-B.ttf", 25)
  9. draw=ImageDraw.Draw(img)
  10. draw.text((20, 20), 'Hacker News : ', fill=(255,255,255), font=font)
  11. draw.text((30, 100), 'You can paint on Ideone', fill=(200,200,200), font=font2)
  12.  
  13. # ideone output
  14. img.save(sys.stdout, 'PNG')
  15.  
Success #stdin #stdout 0.16s 12752KB
stdin
Standard input is empty
stdout