473,320 Members | 2,122 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,320 software developers and data experts.

Image in python

hi

can anyone tell me how can i set image field in python
suppose i have one image i want to displya it in my window.
so how can i view image in pythom,is there any fields like fields.image() in python so that i can view my image dynamically

thank you,
Jun 18 '07 #1
3 2372
bartonc
6,596 Expert 4TB
hi

can anyone tell me how can i set image field in python
suppose i have one image i want to displya it in my window.
so how can i view image in pythom,is there any fields like fields.image() in python so that i can view my image dynamically

thank you,
You'll want to start by get the Python Image Library. How you use it will depend on your GUI Toolkit (Tkinter, etc.).
Jun 18 '07 #2
hi

can anyone tell me how can i set image field in python
suppose i have one image i want to displya it in my window.
so how can i view image in pythom,is there any fields like fields.image() in python so that i can view my image dynamically

thank you,

you need to have wxpython installed

Expand|Select|Wrap|Line Numbers
  1. #Image
  2.  
  3. import os
  4.  
  5.         image = wx.Image('imagename.jpg')
  6.         imgResizeMax(image,(225, 225)) # Resize your image to 225X225 pixels
  7.         self.picturedisplay = wx.StaticBitmap(self.panel,wx.ID_ANY,bitmap=image.ConvertToBitmap(),pos=(10,10),size=(283,223)) #set the size of the field the image will be displayed in, and everything else.
  8.  
hope this helps
Aug 8 '07 #3
bartonc
6,596 Expert 4TB
you need to have wxpython installed
<snip>
hope this helps
Hello bushticals. Thank you for your post. However, while wxPython is a great GUI toolkit, there are others that support images. Tkinter and PIL is one example.

So a better statement would have been something like:
"If you are using wxPython, here is some code to get you started".

Thanks, again,
Barton
Aug 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Scott Brady Drummonds | last post by:
Can anyone recommend the easiest way of generating thumbnail images using a Python library? I've seen that the Python Image Library (PIL) seems to do this but it isn't installed on my available...
2
by: haddock | last post by:
hi all Is it possible to access the size (with and height) of a .tga image in python? From the documentation I would say no, but I'm pretty new to python... if the answer really is no, has...
9
by: Chris Jankowski | last post by:
Hi all, I am still new to using Python, so bare with me. I am trying to call a DLL from my program to use some of it's functions. The only parameter is supposed to be a pointer to an image. I...
17
by: PyPK | last post by:
Hi I am looking for a simple tiff Image reader/writer in python.Can anyone point me to the right one.
8
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client...
8
by: jbrewer | last post by:
I'm trying to read in a FITs image file for my research, and I decided that writing a file decoder for the Python imaging library would be the easiest way to accomplish this for my needs. FITs is...
5
by: exhuma.twn | last post by:
As many might know, windows allows to copy an image into the clipboard by pressing the "Print Screen" button on the keyboard. Is it possible to paste such an image from the clipboard into a "Text"...
0
by: Independent | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
0
by: norseman | last post by:
Daniel de Sousa Barros wrote: ================================================ Click Start/settings/control panel/system/advanced/settings(in \ performance area)/advanced/change set System...
1
by: zandrew | last post by:
Hello there everyone. For a summer project I'm doing, I have to use a phone to pass an image I've taken (on the phone) to a dedicated server I've made on a local ubuntu machine. For the upload code,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.