Fixed return type in copy function in image classes.