updated using png.js for whitebalance