Writing a "Raw" Image to a File (Win, PIL)

MRAB google at mrabarnett.plus.com
Sat Apr 11 12:38:57 EDT 2009


W. eWatson wrote:
> I have an image of described as:
> Img Info:  {}
>  size:  (640, 480)
>  format:  None
>  mode:  P
>  palette:  <ImagePalette.ImagePalette instance at 0x02393378>
>  bands:  ('P',)
>  type:  <type 'instance'>
> 
> I'd like to write it to a file. Apparently, I need to convert it to a 
> string first. How do I do that? Pickle?

Have you tried the .tostring() method?



More information about the Python-list mailing list