Package org.schabi.newpipe.extractor
Enum Class Image.ResolutionLevel
- All Implemented Interfaces:
Serializable,Comparable<Image.ResolutionLevel>,Constable
- Enclosing class:
- Image
The estimated resolution level of an
Image.
Some services don't return the size of their images, but we may know for a specific image type that a service returns, according to real data, an approximation of the resolution level.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Image.ResolutionLevelfromHeight(int heightPx) Get aImage.ResolutionLevelbased from the given height.static Image.ResolutionLevelReturns the enum constant of this class with the specified name.static Image.ResolutionLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HIGH
The high resolution level.This level applies to images with a height greater than or equal to 720px.
-
MEDIUM
The medium resolution level.This level applies to images with a height between 175px inclusive and 720px exclusive.
-
LOW
The low resolution level.This level applies to images with a height between 1px inclusive and 175px exclusive.
-
UNKNOWN
The unknown resolution level.This value is returned when the extractor doesn't know what resolution level an image could have, for example if the extractor loops in an array of images with different resolution levels without knowing the height.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromHeight
Get aImage.ResolutionLevelbased from the given height.- Parameters:
heightPx- the height from which returning the goodImage.ResolutionLevel- Returns:
- the
Image.ResolutionLevelcorresponding to the height provided. See theImage.ResolutionLevelvalues for details about what value is returned.
-