-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pygame.image.load #3273
Comments
Hi :) |
Thanks for your fast answer ! Maybe a warning if we try to blit a not converted surface may be useful to tell us we don't use pygame-ce correctly ? |
No worries :) I still think your concearn was valid. Non official examples always don't use the best available, some official examples don't follow all conventions either but with time they will get better. Almost forgot, if the idea of adding a debug mode of pygame goes through, your warning could actually be a good idea, just saying. |
This is a great idea, but damus is right about it being infeasible to implement given the fact that images can be loaded before the display is set up, and convert() doesn't know what to do before the display is set up. There are valid use cases where someone would blit surfaces that aren't converted. Like if someone was using pygame.camera support for webcams and getting raw frames out, it's not worth converting() and then blitting if the webcam frame is only going to be around for a frame or two. Same with other streaming applications. I could see it being annoying for experienced users getting warnings about things they know they are doing correctly. |
Very good argument ! |
The doc of pygame.image.load says :
You will often want to call pygame.Surface.convert() with no arguments, to create a copy that will draw more quickly on the screen.
Is it often or always ?
If it's often, in which case ?
if it's always, the image.load function can make this task directly (convert or convert_alpha depending of the image), no ?
I've seen a lot of pygame's example where the images are loaded but not converted. This can slowdown the blits.
The text was updated successfully, but these errors were encountered: