Fixed bug in imageprocessor. Removed image unref in imageread operation.