BLock Image Transfer - Involves copying one bitmap onto another using a raster operator.
Questions tagged [blit]
303 questions
0
votes
1 answer
Pygame Blit Once?
I'm using Pygame and imported and image into a surface then used the blit command:
screen.blit(surface,(x,y)) but it keep on stacking surfaces, how can I stop it at just 1 surface?

LOLerKing
- 9
- 1
- 4
0
votes
0 answers
Looking for a fast portable method for colorkeying 8bit images
I am looking for a fast, C language, portable method (freestanding, no libraries) for performing colorkeyed blits. The target is a freestanding emulator library for a retro style computer design.
My current take on this (the images are stored in…

Jubatian
- 2,171
- 16
- 22
0
votes
2 answers
Why won't the sprites move upward?
I made a class for my game:
class Magazine(pygame.sprite.Sprite):
def __init__(self, image, shooter):
self.image = image
self.xCoord = shooter.xCoord + (shooter.image.get_width()/2) - (self.image.get_width()/2)
…

number1son10
- 51
- 2
- 8
0
votes
1 answer
How do you make an image transparent over a period of time?
I am currently trying to display a death screen when the player dies in my game, but rather than it just popping up I want it to gradually becoming less and less transparent until the opacity is 256. I currently have this line of code below to…

Monkeymad358
- 3
- 3
0
votes
2 answers
Why doesnt my sprite move?
I'm new to Pygame and I'm trying to move my sprite on my background image.
My sprite is not re appearing after it moves? Any ideas?
This is most of the program without some screens.
I have been trying to get this to work for many hours,
…

Allanco
- 1
- 2
0
votes
1 answer
Why won't my pygame program display my image
import pygame
from pygame.locals import *
pygame.init()
width, height = 640, 480
screen=pygame.display.set_mode((width, height),0,32)
player=pygame.image.load("cat.png")
while True:
screen.fill(0,255,0)
screen.blit(player,(100,100))
…
0
votes
0 answers
Surface not blitting to screen SDL
I have a problem, where when I build my code it works fine, but when I run it, I get an access violation error, and ive tracked it to this little bit of code here:
void thePlayer::show_player()
{
SDL_BlitSurface(Player, NULL, ScreenSurface,…

Tom
- 2,372
- 4
- 25
- 45
0
votes
2 answers
Trying to programmatically display a vector using blit
New to python and I am just trying to test out some stuff. From some research I think I need a list to store all the vector points
mlist1 = [
[7, 12],
[22, 31],
[4, 17]]
everything is good I test it out as a print to see.
print (mlist1);
but now…
user3577516
0
votes
1 answer
Printing text - Python / Pygame
Currently I am working on a small 'space invaders' style game using pygame and I wanted to create various outcomes depending on the score / health level. I wish to make it so if the enemy ships have passed the player and go off the screen and the…

Oscar
- 97
- 4
- 14
0
votes
1 answer
Using pygame.Surface.blit inside class
I can call my class only one time.
My code is:
class fish:
def __init__(self, x, y, image, speed):
self.x = x
self.y = y
self.image = image
self.speed = speed
def be(self):
screen.blit(self.image,…

knowledge
- 383
- 3
- 15
0
votes
1 answer
blit function to render a utf-8 string across the screen
I have written a pygame script that renders a horizontally moving text across the screen. It works, but when I change the string to a non-latin string (Persian), it does not work completely. I mean it does everything (animation, rendering ...) but…
user3077503
0
votes
2 answers
Flash: combine two BitmapData objects via max( channel )
I have two BitmapData objects with alpha channels. I'd like to combine them into a single one by using max(channel_image_one, channel_image_two) for each channel, including the alpha. Is there an easy way to achieve this result?

BuschnicK
- 5,304
- 8
- 37
- 49
0
votes
1 answer
Python Blitting not working?
I'm writing a game in python and pygame and i trying to create a main menu, but my label wont show up????, also im getting this error: line 22, in x,y = pygame.mouse.get_pos()
error: video system not initialized???? i don't understand what is…

user3256142
- 11
- 1
- 1
- 4
0
votes
1 answer
Pygame delete something from a surface, and hold a timer for it withhout pause the game
I develop a game, and I blit a text to the screen as follow:
message = font.render( "Hello World" , True)
surface_1.blit(message, some_rect)
So on the screen a message "Hello World" is appearing now. What I need is a way of holding this message for…

Dr. Programmer
- 368
- 1
- 7
- 19
0
votes
2 answers
How do I blit an image on a keypressed event in pygame
I'm trying to blit an image to the screen when the event K_SPACE is triggered.
However, when I press space nothing happens. I've tried moving where the screen is updated or flipped, but i've hit a brick wall.
Here is my code:
def Play():
…

user2233480
- 43
- 1
- 3
- 9