Discussion:
[Bitpim-devel] Re: [bitpim-cvs-checkins] bitpim com_samsungscha650.py,1.27,1.28
Roger Binns
2005-01-03 04:44:41 UTC
Permalink
+ # copy from Sanyo code, not sure what's the
+ # significant of size 16383 ??
+ self.__phone.writefile(name,
+ conversions.convertto8bitpng(\
+ media[k]['data'], 16383))
Note that you don't need the backslash. Python sucks up to the enclosing
bracket even if it is on another line.

The significance of the 16383 is it is the maximum size of the file. The
Sanyo phones have the requirement that the image is an 8bit png and that
it is less than 16kb in size. The code in conversions will keep reducing
the number of colours until the file is smaller than the size passed in.

Roger

Loading...