code: public static ImageReader getImageReader(final Object sourceImage) throws IOException {
  
          ImageInputStream imageInputStream = ImageIO.createImageInputStream(sourceImage);
          Iterator<ImageReader> imageReaders = ImageIO.getImageReaders(imageInputStream);
          ImageReader destinationImageReader = null;
          if (imageReaders.hasNext()) {
              destinationImageReader = imageReaders.next();
              setImageReaderHaveInputStream(destinationImageReader, imageInputStream);
          }
          return destinationImageReader;
      }
docs: Get image reader from given source image.
  
  @param sourceImage
  the image object you want to handle.
  @return an image read object has given source image data.
  @throws IOException