473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Easy image rendering?

Can someone tell me what's the absolute easiest way of putting an image
on to the screen in Python without just opening it up in an
application? What's the simplest way to just put something up on the
screen?

Aug 9 '06 #1
7 1805
On Wed, 09 Aug 2006 16:27:50 -0700, ja*******@gmail.com wrote:
Can someone tell me what's the absolute easiest way of putting an image
on to the screen in Python without just opening it up in an
application? What's the simplest way to just put something up on the
screen?
If you are using PIL you could use im.show(); but all that does is saving
the image data to a file and opening that file in an external
application (xv on UNIX). At least you don't have to do it yourself.
Aug 10 '06 #2

jayCan someone tell me what's the absolute easiest way of putting an
jayimage on to the screen in Python without just opening it up in an
jayapplication? What's the simplest way to just put something up on
jaythe screen?

Maybe something like this:

import PIL.Image
img = PIL.Image.open(open("someimage.png", "rb"))
img.show()

Skip
Aug 10 '06 #3

import PIL.Image
img = PIL.Image.open(open("someimage.png", "rb"))
img.show()

No need for the extra open. Sorry...

Skip

Aug 10 '06 #4
No good. No external applications. What else is there? Worst case
scenario, what's the easiest way to do GUI?

Pontus Ekberg wrote:
On Wed, 09 Aug 2006 16:27:50 -0700, ja*******@gmail.com wrote:
Can someone tell me what's the absolute easiest way of putting an image
on to the screen in Python without just opening it up in an
application? What's the simplest way to just put something up on the
screen?

If you are using PIL you could use im.show(); but all that does is saving
the image data to a file and opening that file in an external
application (xv on UNIX). At least you don't have to do it yourself.
Aug 10 '06 #5
>If you are using PIL you could use im.show(); but all that does is
saving the image data to a file and opening that file in an external
application (xv on UNIX). At least you don't have to do it yourself.
jayNo good. No external applications. What else is there? Worst case
jayscenario, what's the easiest way to do GUI?

You can still use PIL. Just feed the result to Tkinter. Check out the
ImageTk module that's part of PIL:

http://www.pythonware.com/library/pi...ok/imagetk.htm

Check this thread for some hints from Fredrik Lundh on combining PIL and
Tkinter:

http://mail.python.org/pipermail/pyt...ly/007379.html

I'm sure when he gets up in Europe he'll be able to provide some more useful
pointers.

Skip

Aug 10 '06 #6
I think that you've put me on the right track, but my eventual goal is
to be able to put the pictures on the screen with a full-screen
interface. Not in a visible window, with just the picture and then a
black backdrop for it.

sk**@pobox.com wrote:
If you are using PIL you could use im.show(); but all that does is
>saving the image data to a file and opening that file in an external
>application (xv on UNIX). At least you don't have to do it yourself.

jayNo good. No external applications. What else is there? Worst case
jayscenario, what's the easiest way to do GUI?

You can still use PIL. Just feed the result to Tkinter. Check out the
ImageTk module that's part of PIL:

http://www.pythonware.com/library/pi...ok/imagetk.htm

Check this thread for some hints from Fredrik Lundh on combining PIL and
Tkinter:

http://mail.python.org/pipermail/pyt...ly/007379.html

I'm sure when he gets up in Europe he'll be able to provide some more useful
pointers.

Skip
Aug 10 '06 #7
ja*******@gmail.com:
my eventual goal is
to be able to put the pictures on the screen with a full-screen
interface. Not in a visible window, with just the picture and then a
black backdrop for it.
Pygame (plus PIL if you need) can do that, Pygame manages full screens
too.

Bye,
bearophile

Aug 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark McKay | last post by:
I'm developing an application that draws on several disk based images to create a composite image. I've noticed that my rendering time goes up as I load more images into memory. However, this...
6
by: bissatch | last post by:
Hi, I am currently writing a news admin system. I would like to add the ability to add images to each article. What I have always done in the past is uploaded (using a form) the image to a...
2
by: Jeronimo Bertran | last post by:
I have an aspx page that shows a complex image with several objects that are sensitive to mouseover events. The information about the objects in the image is obtained from a database and complex...
2
by: Jeronimo Bertran | last post by:
Hello, I am using a rendering aspx page to display a database image on an Image control. When the database record is retrieved, I am saving the bitmap to a session variable for the rendering...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
6
by: nichughes | last post by:
Hello all, A question relating to http://www.entrust-systems.net/ Just for a change I have run into a problem that seems to be OS specific rather than browser specific - the box image that is...
1
by: ApexData | last post by:
Hello I am in the early stages of my project development, and want to make sure that I am approaching the issue of image display correctly. Access2000. I have one table and a bound single...
0
by: hardieca | last post by:
Hi, I would like to create an adapter for the image web control to cure a pet peeve of mine. Currently, if I write out: <asp:Image ImageUrl="myPic.jpg" AlternateText="Some text"...
4
by: Ryan Knopp | last post by:
This is an update from a previous post, I just simplified the code. It seems that I can't get the image map to work with IE7. The page is located here http://www.theknopps.com/test.html and the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.