Re: Canvas() to Image() fonts
Michael Lange <[email protected]> Sat, 29 Jul 2023 22:52:17 +0200
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Hi Bob, On Fri, 28 Jul 2023 13:00:10 -0600 Bob Greschke <[email protected]> wrote: > Hi Michael! > > I'm working up to Image.save("something.png"). The program will produce > a picture for each of five different monitors each day, and then > they'll end up on a web page, so a .png is desired. The program now > draws the canvas, then uses an ImageGrab.grab() to make a picture of > the Canvas. The problem, in Debian/X11/etc. is that you have to be > logged in and looking at what is going on. If you try to run the > image-making remotely (ssh -Y'ing), or using a cron job, everything > works, but the pictures come out blank because there's no valid > $DISPLAY. I'm trying to get it automated with the Image, however > forcing me to look at the pictures and watch for anomalies in the > signals each day is not a bad thing. :) maybe you could use Canvas.postscript() and then convert the output to png with psconvert, not sure if this helps with the missing $DISPLAY though. Plus you might need to stick with a font whose spelling Tk and postscript agree about (I think Arial would be my first guess here). Have a nice day, Michael