Code clean up of cnOutput::getImage().