Added outputImage method to create png from binary data