Package 

Class AspectRatioResizer

  • All Implemented Interfaces:
    com.otaliastudios.transcoder.resize.Resizer

    
    public class AspectRatioResizer
     implements Resizer
                        

    A Resizer that crops the input size to match the given aspect ratio, respecting the source portrait or landscape-ness.

    • Constructor Summary

      Constructors 
      Constructor Description
      AspectRatioResizer(float aspectRatio) Creates a new resizer.
    • Method Summary

      Modifier and Type Method Description
      Size getOutputSize(@NonNull() Size inputSize) Parses the input size and returns the output.This method should throw an exception if the input size is not processable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AspectRatioResizer

        AspectRatioResizer(float aspectRatio)
        Creates a new resizer.
        Parameters:
        aspectRatio - the desired aspect ratio
    • Method Detail

      • getOutputSize

        @NonNull() Size getOutputSize(@NonNull() Size inputSize)

        Parses the input size and returns the output.This method should throw an exception if the input size is not processable.

        Parameters:
        inputSize - the input video size