Package io.imagekit.models
Class Transformation.AspectRatio
-
- All Implemented Interfaces:
public final class Transformation.AspectRatioSpecifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with either width or height (but not both). For example: aspectRatio =
4:3,4_3, or an expression likeiar_div_2. See Image resize and crop – Aspect ratio.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTransformation.AspectRatio.VisitorAn interface that defines how to map each variant of AspectRatio to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<Double>number()final Optional<String>string()final BooleanisNumber()final BooleanisString()final DoubleasNumber()final StringasString()final Optional<JsonValue>_json()final <T extends Any> Taccept(Transformation.AspectRatio.Visitor<T> visitor)final Transformation.AspectRatiovalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Transformation.AspectRatioofNumber(Double number)final static Transformation.AspectRatioofString(String string)-
-
Method Detail
-
accept
final <T extends Any> T accept(Transformation.AspectRatio.Visitor<T> visitor)
-
validate
final Transformation.AspectRatio validate()
-
ofNumber
final static Transformation.AspectRatio ofNumber(Double number)
-
ofString
final static Transformation.AspectRatio ofString(String string)
-
-
-
-