[Image-SIG] 答复: gif convert png wrong

Charlie Clark charlie.clark at clark-consulting.eu
Fri Dec 30 17:17:56 CET 2011


Hi Song,

Am 30.12.2011, 02:38 Uhr, schrieb 宋立新(凡卓通讯)  
<songlixin at vanzotec.com>:

> Dear Charlie:
> 	For my case, frame 57 is wrong and also some after 57.
> 	I think it's a known issue bcz so many tools(Include ACDSee) got same  
> problem. Maybe IP reasons.

Possibly a palette problem. If I open the file in Photoline (a very good  
Photoshop clone) I have two layers that have no background while all  
others have a black background. This would seem to be a palette  
optimisation.

If you compile your own version of PIL be sure to check the versions of  
the underlying libraries.

> 	I will try on MacOS.

> Also thanks for your advice to be more Pythinic.

Of course, your use of an generator function was Pythonic but a little  
over the top, especially as it actually creates a counter that the for  
loop could use. The counter is necessary as my use of "duration" was an  
incorrect guess!

More importantly, you are unnecessarily creating copies of each frame in  
memory just to save the frames to disk. However, as disk IO seems to be  
the bottleneck this has little practical implications for this image but  
could be important in another situation.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226


More information about the Image-SIG mailing list