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. Advertising

  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. Advertising

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. Nicolas Pourcelot

    exporting from Tkinter Canvas object in PNG

    Nicolas Pourcelot, Jan 11, 2005, in forum: Python
    Replies:
    0
    Views:
    285
    Nicolas Pourcelot
    Jan 11, 2005
  2. Replies:
    0
    Views:
    462
  3. Replies:
    2
    Views:
    281
  4. Replies:
    0
    Views:
    124
  5. Dr J R Stockton

    Chrome, canvas, PNG, Save Image As

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

Share This Page