#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    Draw a simple Image


    Hi everyone,
    What is the easiest way to draw (circles, rectangle, text and lines) in a file (jpg, gif or png) or in a viewer?
    I looked at the PIL library, but that package seems to offer only modifications of image and not creation from scratch!
    I want something very simple...
    Which library should I import, what are the functions??
    I did not find any tutorial on that!

    Thank you!
    Matt
    Last edited by matt_hayabusa; September 7th, 2003 at 03:47 PM.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    You might need to give PIL a file to open - there may be a way around this, i'm not a big user - but it can definatly meet your needs! Take a look at the module reference for more info on which PIL module does what.

    http://www.pythonware.com/library/pi...-reference.htm

    In particular i'd look at ImageDraw and PSDraw. I'd also read though the tutorial if you havn't already PIL does the advanced stuff well but I can also do the basics..

    Some other packages you might be interested in:

    http://pyx.sourceforge.net/
    http://vpython.org/

    Hope this helps,
    Mark.
    Last edited by netytan; September 7th, 2003 at 05:32 PM.

IMN logo majestic logo threadwatch logo seochat tools logo