altered png to filter images to b/w when weighted is false; thresholding now sets pixels to 0 as well.