Figure extension is changed from tif to png
Threshold calculation is changed.