Incorporate standard deviation into image writing