Re: exporting from Tkinter Canvas object in PNG

Discussion in 'Python' started by harold fellermann, Jan 11, 2005.

  1. On 11.01.2005, at 19:14, Nicolas Pourcelot wrote:

    > Hello,
    > I'm new to this mailing list and quite to Pyhon too.
    > I would like to know how to export the contain of the Canvas object
    > (Tkinter) in a PNG file ?
    > Thanks :)
    > Nicolas Pourcelot
    > --
    > http://mail.python.org/mailman/listinfo/python-list


    you can make a postscript dump using

    >>> canvas = Tkinter.Canvas(master)
    >>> canvas.postscript(file="your_file_name.ps")


    If you have ImageMagick, you can later use

    % convert your_file_name.ps your_file_name.png

    on the comand line, if you want to have png.


    - harold -

    --
    Science is to see what everybody else has seen,
    and think what nobody else has thought.
    --
     
    harold fellermann, Jan 11, 2005
    #1
    1. Advertisements

  2. In article <>,
    harold fellermann <> wrote:
    >On 11.01.2005, at 19:14, Nicolas Pourcelot wrote:
    >
    >> Hello,
    >> I'm new to this mailing list and quite to Pyhon too.
    >> I would like to know how to export the contain of the Canvas object
    >> (Tkinter) in a PNG file ?
    >> Thanks :)
    >> Nicolas Pourcelot
    >> --
    >> http://mail.python.org/mailman/listinfo/python-list

    >
    >you can make a postscript dump using
    >
    > >>> canvas = Tkinter.Canvas(master)
    > >>> canvas.postscript(file="your_file_name.ps")

    >
    >If you have ImageMagick, you can later use
    >
    >% convert your_file_name.ps your_file_name.png
    >
    >on the comand line, if you want to have png.

    .
    .
    .
    Different ideas appear in <URL:
    http://groups-beta.google.com/group/comp.lang.python/msg/1cc5f5ea9fb89b5f >.
     
    Cameron Laird, Jan 16, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Askari
    Replies:
    2
    Views:
    1,008
    Askari
    Aug 30, 2004
  2. PhilC
    Replies:
    2
    Views:
    1,133
    PhilC
    Oct 25, 2004
  3. Nicolas Pourcelot

    exporting from Tkinter Canvas object in PNG

    Nicolas Pourcelot, Jan 11, 2005, in forum: Python
    Replies:
    0
    Views:
    398
    Nicolas Pourcelot
    Jan 11, 2005
  4. Replies:
    0
    Views:
    654
  5. Replies:
    2
    Views:
    398
  6. Replies:
    3
    Views:
    1,274
    globalrev
    Apr 19, 2008
  7. Replies:
    0
    Views:
    203
  8. Dr J R Stockton

    Chrome, canvas, PNG, Save Image As

    Dr J R Stockton, Dec 28, 2009, in forum: Javascript
    Replies:
    2
    Views:
    469
    Dr J R Stockton
    Dec 29, 2009
Loading...