Re: [PyOpenGL-Users] Help: glReadPixels error on OS X
Brought to you by:
mcfletch
From: Chris B. - N. F. <chr...@no...> - 2013-05-23 17:01:47
|
On Thu, May 23, 2013 at 7:15 AM, Ian Mallett <ia...@ge...> wrote: > Instead of: > pixel = ord(pixel[0]), ord(pixel[1]), ord(pixel[2]) > Try this: > pixel = pixel[0][0][0],pixel[1][0][0],pixel[2][0][0] > Python 3 handles strings much differently from Python 2. I suspect PyOpenGL > was changed, intentionally, to make this string functionality consistent > across Python versions. couldn't it return a bytes object in both cases? (which is a string on py2, of course...) or maybe even better an array.array object. (just sayin') -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |