Re: pygame on win32, image.fromstring()

2005-05-14 Thread tlviewer
tlviewer wrote: > Next I'm going to load all 53 card resources into a list (array) of > strings, then write it out, pickled. That should smooth out loading the >game when I use 4-6 decks (Blackjack-21). # -*- coding: cp1252 -*- """ keywords: resource bitmap pickle description: pickle reso

Re: pygame on win32, image.fromstring()

2005-05-14 Thread tlviewer
"Greg Krohn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > tlviewer wrote: > > hello, > > hi > > > fp = open( "e:/batch/python/aceclub.bmp", "wt") > > wt? Should this be wb? > > > # gives: ValueError: String length does not equal format and resolution size > > img = gm.image.fromst

Re: pygame on win32, image.fromstring()

2005-05-14 Thread Greg Krohn
tlviewer wrote: > hello, hi > fp = open( "e:/batch/python/aceclub.bmp", "wt") wt? Should this be wb? > # gives: ValueError: String length does not equal format and resolution size > img = gm.image.fromstring(str,(71,96),"P") The pygame docs say "P" is for 8bit pallete indices. When I look at t

pygame on win32, image.fromstring()

2005-05-13 Thread tlviewer
hello, The script below is a prototype for loading playing card images from the bitmap resource in cards.dll (WinXP) I like the idea of not keeping copies of the images as files. I'm able to extract the card images as files, then load them in pygame as a surface, but I keep getting errors when d