raster (PIL)

superpollo user at example.net
Thu Jul 23 09:02:55 EDT 2009


Peter Otten wrote:
...
> Here's a different approach:
...
> raster_string = ...
> 
> width = raster_string.index("\n")
> height = raster_string.count("\n")

your approach has a funny side-effect: try to remove just one zero from 
the first line of the raster ;-)

bye



More information about the Python-list mailing list