humble-video-noarch/src/main/java/io/humble/video/awt/MediaPictureConverterFactory.java
public static MediaPictureConverter createConverter(
    BufferedImage image,
    PixelFormat.Type pictureType)
  {
    if (image == null)
      throw new IllegalArgumentException("The image is NULL.");

    // find the converter type based in image type

    String converterDescriptor = findDescriptor(image);
    if (converterDescriptor == null)
      throw new UnsupportedOperationException(
        "No converter found for BufferedImage type #" + 
        image.getType());

    // create and return the converter

    return createConverter(converterDescriptor, pictureType,
      image.getWidth(), image.getHeight());
  }
public static MediaPictureConverter createConverter(
    BufferedImage image,
    PixelFormat.Type pictureType)
  {
    if (image == null)
      throw new IllegalArgumentException("The image is NULL.");

    // find the converter type based in image type

    String converterDescriptor = findDescriptor(image);
    if (converterDescriptor == null)
      throw new UnsupportedOperationException(
        "No converter found for BufferedImage type #" + 
        image.getType());

    // create and return the converter

    return createConverter(converterDescriptor, pictureType,
      image.getWidth(), image.getHeight());
  }
public static MediaPictureConverter createConverter ( BufferedImage image , PixelFormat . Type pictureType ) { if ( image == null ) throw new IllegalArgumentException ( "The image is NULL." ) ; // find the converter type based in image type String converterDescriptor = findDescriptor ( image ) ; if ( converterDescriptor == null ) throw new UnsupportedOperationException ( "No converter found for BufferedImage type #" + image . getType ( ) ) ; // create and return the converter return createConverter ( converterDescriptor , pictureType , image . getWidth ( ) , image . getHeight ( ) ) ; }
Create a converter which translates between {@link BufferedImage}
and {@link MediaPicture} types. The {@link BufferedImage} type and
size are extracted from the passed in image.  This factory will
attempt to create a converter which can perform the translation.
If no converter can be created, a descriptive {@link
UnsupportedOperationException} is thrown.

@param image the image from which size and type are extracted
@param pictureType the picture type of the converter

@throws UnsupportedOperationException if no converter for the
specified BufferedImage type exists
@throws UnsupportedOperationException if the found converter can
not be properly initialized
@throws IllegalArgumentException if the passed {@link
BufferedImage} is NULL;
Create a converter which translates between { @link BufferedImage } and { @link MediaPicture } types . The { @link BufferedImage } type and size are extracted from the passed in image . This factory will attempt to create a converter which can perform the translation . If no converter can be created a descriptive { @link UnsupportedOperationException } is thrown .