BLock Image Transfer - Involves copying one bitmap onto another using a raster operator.
Questions tagged [blit]
303 questions
2
votes
1 answer
Create space between characters blitted on screen - SDL
I have a bmp-file of numbers and characters. My program reads keypresses and blits the appropriate character/number from the bitmap onto the screen. The only problem is if i press 'A' - 'A' will show on screen, but if I press 'B', it will take 'A's…

Nilzone-
- 2,766
- 6
- 35
- 71
2
votes
2 answers
Fast 1bit transparency blit on ARM cortex m4 DSP code
I'd like to set bytes from a bitmap to memory, setting bytes which value is not equal to a given transparency byte value.
Schematically I'd like to do :
for (char *src=start;src

makapuf
- 1,370
- 1
- 13
- 23
2
votes
3 answers
Split Image in Pygame
I have a 200x200px image in pygame that I'd like to slice in half, so the 2 shapes would be 100x200px. Afterwards, I'd like to blit the 2 new images on the screen with a set amount of pixels in between them. How would an image be split/cropped in…

Eric
- 99
- 2
- 9
1
vote
1 answer
Undo steps in Pygame
I was wondering how I would undo drawing steps in Python/Pygame.
Basically I have made the mouse draw lines, and when I click my undo Rect, I want the screen to revert back to its original state (before mouse was pressed).
Here is my code but it…

bahaaz
- 45
- 1
- 3
- 9
1
vote
2 answers
How to load and blit image python
I am trying to use the
tkFileDialog.askopenfilename
to load an image and then blit it on screen, but it isn't working out.
I created a Rect button so that when I click it it would open the dialogue box to load
an image. After loading it I want it…

bahaaz
- 45
- 1
- 3
- 9
1
vote
1 answer
ActionScript 3.0 - Blitting with repositioning sprite sheet vs. copyPixels?
which is more performant for blitting - repositioning a sprite sheet within a scrollRect or using copyPixels()?

Chunky Chunk
- 16,553
- 15
- 84
- 162
1
vote
1 answer
Live plotting nicely with blit or Animation from matplotlib
Trying to be short and fast . I have a scatter plot I want to do in a for loop in live.
So I have this :
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import random
import time
x =…

et11enne
- 377
- 1
- 11
1
vote
1 answer
How to save an image after changing its resolution in Pygame?
Currently, I am a beginner when it comes to Pygame, and have been trying to allow the user to hand-draw digits into a canvas. I have managed to get the code to draw and clear the canvas to work. However, the pictures I want to save must be 28 by 28…

Help_Me_Please
- 13
- 3
1
vote
0 answers
Flickering windows for Matplotlib animation
I'm trying to create a simulator in Python with Matplotlib as the GUI. I'd like to have a number of different figures, all individually animated - i.e. one showing the main simulation window, another showing graphs, etc. I'm using the Matplotlib…

Lord Cat
- 401
- 4
- 13
1
vote
2 answers
blit opencv camera capture with pygame throws TypeError: argument 1 must be pygame.Surface, not cv2.VideoCapture
I'm new to pygame and never used it before and wanted to know how I can blit or display my webcam into the surface by using pygame and opencv but I keep getting the message:
Traceback (most recent call last):
File ".py", line 51, in…

Saltbottle
- 43
- 3
1
vote
1 answer
Python: why the surface.blit function doesn't display all inputs?
I am trying to write a little digits game using pygame. The idea of the game is to guess the four-digit number randomly chosen by computer. But I am stuck at the very beginning I started by creating all the essential elements: colours, fonts,…

Zhan
- 11
- 1
1
vote
0 answers
Can't update plot annotations while Blitting is True, but it's too slow when Blitting is False
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib.animation as animation
data = pd.read_csv('simulation_data_7.csv', index_col = 0, header=0)
frames, bins = data.shape
HIST_BINS = np.arange(bins - 3)
fig,…

SuperUser_Vermeylen
- 87
- 8
1
vote
1 answer
The Objects placed in the background are flickering every tick instead of being placed at one place pygame pyhton
I am working on a game using pygame , I filled the background with a color and I want the background not to be boring and empty so i made some art and loaded it into the code using pygame.image.load() Function , now i want them to be placed at…
1
vote
0 answers
How to blit and move big images in python efficiently?
When i try to blit images for a parallax background in my game i run into FPS issues.
I tried .convert(), .convert_alpha(), i made sure that the images are loaded and transformed just once - not in the loop.
The only thing looping is movement…

vuvuwe
- 11
- 1
1
vote
3 answers
Python/Pygame transitioning from one file to another
Sorry if this question is incredibly easy to answer, or I sound like an idiot. I'm wondering how I would execute a script in one file, pygame event loop, blits, etc, then switch to another file, SelectWorld.py, which has it's own event loop, and…

Name McChange
- 2,750
- 5
- 27
- 46