From: Mark B. <mb...@0x...> - 2000-04-20 02:56:19
|
On Wed, 19 Apr 2000, "David Clark wrote: > Ok, I've tried blitting the various file formats supported by > image_load() and image_load_type(). My results: > > BMP: fine. > JPG: fine. > PNG: about 50% slower than bmps or jpgs. > PCX: good speed, same as bmps and jpgs, but odd palette (yellows were > blue) > TIFF: failed to create surface: "RuntimeError: unable to allocate SDL > surface" for image_load(), and "RuntimeError: unable to acquire file > info" for image_load_type(). > PPM: untested > GIF: untested (my copy of the Gimp doesn't output these types) I'm willing to bet that the speed difference in the blit, is due to the fact that surfaces aren't in the same format as the video surface before you blit. The blit function converts them at runtime, if it's not in the same format. TIFF support, though mentioned in SDL_image, is not yet implemented. As such, you can't load TIFFs, yet. I may write a loder and send it to Sam Lantinga, if I ever find time to. Try changing src = sdl.image_load("./happy.png") to src = sdl.image_load("./happy.png").convert(fb, sdl.SWSURFACE) To be fair, you'll want to do it to the BMP, too. This should give comparable figures. |