Added png encoder and minor modifications on the ImageOutputStream