changed imagetopng() function to correctly deal with non-standard bit-depths. Add...