Updated rwpng for cocoa reader