docs: public static BufferedImage toBuffered(MagickImage pImage) throws MagickException {
          if (pImage == null) {
              throw new IllegalArgumentException("image == null");
          }
  
          long start = 0L;
          if (DEBUG) {
              start = System.currentTimeMillis();
          }
  
          BufferedImage image = null;
          try {
              switch (pImage.getImageType()) {
                  case ImageType.BilevelType:
                      image = bilevelToBuffered(pImage);
                      break;
                  case ImageType.GrayscaleType:
                      image = grayToBuffered(pImage, false);
                      break;
                  case ImageType.GrayscaleMatteType:
                      image = grayToBuffered(pImage, true);
                      break;
                  case ImageType.PaletteType:
                      image = paletteToBuffered(pImage, false);
                      break;
                  case ImageType.PaletteMatteType:
                      image = paletteToBuffered(pImage, true);
                      break;
                  case ImageType.TrueColorType:
                      image = rgbToBuffered(pImage, false);
                      break;
                  case ImageType.TrueColorMatteType:
                      image = rgbToBuffered(pImage, true);
                      break;
                  case ImageType.ColorSeparationType:
                      image = cmykToBuffered(pImage, false);
                      break;
                  case ImageType.ColorSeparationMatteType:
                      image = cmykToBuffered(pImage, true);
                      break;
                  case ImageType.OptimizeType:
                  default:
                      throw new IllegalArgumentException("Unknown JMagick image type: " + pImage.getImageType());
              }
  
          }
          finally {
              if (DEBUG) {
                  long time = System.currentTimeMillis() - start;
                  System.out.println("Converted JMagick image type: " + pImage.getImageType() + " to BufferedImage: " + image);
                  System.out.println("Conversion to BufferedImage: " + time + " ms");
              }
          }
  
          return image;
      }