![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
adding images
when you make a program can you add images to it?
if you can where would i look for a code? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
Download Pygame
import pygame
# initiate pygame
pygame.init()
# create screen
screen = pygame.display.set_mode((300,300))
# load image
image = pygame.image.load("my_image.bmp")
# draw image
screen.blit(image, (0, 0))
# update screen
pygame.display.flip() |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Now you are talking about GUI (Graphical User Interface) programming. You have to look under Tkinter, wxPython, pyGTK or similar GUI tools. A related tool is PIL (Python Image Library) that can be used in conjunction with a GUI. These are the kind of tools that can handle images.
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
ok ty you both for the help
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|