humble-video-noarch/src/main/java/io/humble/video/awt/AMediaPictureConverter.java
protected void validatePicture(MediaPicture picture)
  {
    // if the picture is NULL, throw up
    
    if (picture == null)
      throw new IllegalArgumentException("The picture is NULL.");

    // if the picture is not complete, throw up
    
    if (!picture.isComplete())
      throw new IllegalArgumentException("The picture is not complete.");

    // if the picture is an invalid type throw up

    PixelFormat.Type type = picture.getFormat();
    if ((type != getPictureType()) && (willResample() && 
        type != mToImageResampler.getOutputFormat()))
      throw new IllegalArgumentException(
        "Picture is of type: " + type + ", but must be " + 
        getPictureType() + (willResample() 
          ? " or " + mToImageResampler.getOutputFormat()
          : "") +
        ".");
  }
protected void validatePicture(MediaPicture picture)
  {
    // if the picture is NULL, throw up
    
    if (picture == null)
      throw new IllegalArgumentException("The picture is NULL.");

    // if the picture is not complete, throw up
    
    if (!picture.isComplete())
      throw new IllegalArgumentException("The picture is not complete.");

    // if the picture is an invalid type throw up

    PixelFormat.Type type = picture.getFormat();
    if ((type != getPictureType()) && (willResample() && 
        type != mToImageResampler.getOutputFormat()))
      throw new IllegalArgumentException(
        "Picture is of type: " + type + ", but must be " + 
        getPictureType() + (willResample() 
          ? " or " + mToImageResampler.getOutputFormat()
          : "") +
        ".");
  }
Test that the passed picture is valid and conforms to the
converters specifications.

@param picture the picture to test

@throws IllegalArgumentException if the passed {@link
MediaPicture} is NULL;
@throws IllegalArgumentException if the passed {@link
MediaPicture} is not complete.
@throws IllegalArgumentException if the passed {@link
MediaPicture} is not the correct type.