File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,16 @@ def generate_animation(anim_name):
227227 if os .system ("pngcrush -q " + anim_name + "_packed_tmp.png " + anim_name + "_packed.png" ) == 0 :
228228 os .system ("rm " + anim_name + "_packed_tmp.png" )
229229 else :
230- print ("pngcrush not found, output will not be larger " )
230+ print ("pngcrush not found, unable to reduce filesize " )
231231 os .system ("mv " + anim_name + "_packed_tmp.png " + anim_name + "_packed.png" )
232232
233+ # Try to use pngquant since it can significantly reduce filesize for screencasts
234+ # that don't include photos or other sources of many different colors
235+ if os .system ("pngquant -o " + anim_name + "_quant.png " + anim_name + "_packed.png" ) == 0 :
236+ os .system ("mv " + anim_name + "_quant.png " + anim_name + "_packed.png" )
237+ else :
238+ print ("pngquant not found, unable to reduce filesize" )
239+
233240 # Generate JSON to represent the data
234241 delays = (array (times [1 :] + [times [- 1 ] + END_FRAME_PAUSE ]) - array (times )).tolist ()
235242
You can’t perform that action at this time.
0 commit comments