bugfix 4748: merging images with different pixel type