public class ImageTransformDto extends Object
PARAM_VALUE,PARAM_VALUE
The following parameters are supported:
setScene(Integer)setWidth(Integer)setHeight(Integer)setAspectRatio(AspectRatio)setMaxWidth(Integer) setMaxHeight(Integer) setDpi(Integer)setColorSpace(ColorSpaceDto)setBackgroundColor(ColorDto)setAlphaColor(ColorDto)setQuality(Integer)ImageTypeDto, see setOutputType(ImageTypeDto)| Modifier and Type | Class and Description |
|---|---|
static class |
ImageTransformDto.ImageTransformDtoBuilder |
| Constructor and Description |
|---|
ImageTransformDto() |
| Modifier and Type | Method and Description |
|---|---|
static ImageTransformDto.ImageTransformDtoBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static ImageTransformDto |
from(@NonNull String transformString)
Parse a string into the transform it represents.
|
ColorDto |
getAlphaColor()
Color specification of a color that should be made transparent.
|
AspectRatio |
getAspectRatio()
The aspect ratio that the resulting image should have.
|
ColorDto |
getBackgroundColor()
Color specification for the background of the image.
|
ColorSpaceDto |
getColorSpace()
Color space for the resulting image, can for example be used to convert to grayscale.
|
CropDto |
getCrop()
Contains the settings for the crop that should be taken from the original image.
|
Integer |
getDpi()
DPI that should be used for processing the image (and in the resulting output image).
|
Integer |
getHeight()
The height in pixels of the resulting image.
|
Integer |
getMaxHeight()
Maximum height of the resulting image.
|
Integer |
getMaxWidth()
Maximum width of the resulting image.
|
ImageTypeDto |
getOutputType()
The output type for this transform.
|
Integer |
getQuality()
Quality for the created image, relevant for lossy image formats like JPEG.
|
Integer |
getScene()
The specific scene of the source image that should be transformed.
|
Integer |
getWidth()
The width in pixels of the resulting image.
|
int |
hashCode() |
boolean |
isEmpty() |
void |
setAlphaColor(ColorDto alphaColor)
Color specification of a color that should be made transparent.
|
void |
setAspectRatio(AspectRatio aspectRatio)
The aspect ratio that the resulting image should have.
|
void |
setBackgroundColor(ColorDto backgroundColor)
Color specification for the background of the image.
|
void |
setColorSpace(ColorSpaceDto colorSpace)
Color space for the resulting image, can for example be used to convert to grayscale.
|
void |
setCrop(CropDto crop)
Contains the settings for the crop that should be taken from the original image.
|
void |
setDpi(Integer dpi)
DPI that should be used for processing the image (and in the resulting output image).
|
void |
setHeight(Integer height)
The height in pixels of the resulting image.
|
void |
setMaxHeight(Integer maxHeight)
Maximum height of the resulting image.
|
void |
setMaxWidth(Integer maxWidth)
Maximum width of the resulting image.
|
void |
setOutputType(ImageTypeDto outputType)
The output type for this transform.
|
void |
setQuality(Integer quality)
Quality for the created image, relevant for lossy image formats like JPEG.
|
void |
setScene(Integer scene)
The specific scene of the source image that should be transformed.
|
void |
setWidth(Integer width)
The width in pixels of the resulting image.
|
ImageTransformDto.ImageTransformDtoBuilder |
toBuilder() |
String |
toString() |
public static ImageTransformDto from(@NonNull @NonNull String transformString)
transformString - versionpublic boolean isEmpty()
public static ImageTransformDto.ImageTransformDtoBuilder builder()
public ImageTransformDto.ImageTransformDtoBuilder toBuilder()
public Integer getScene()
public Integer getWidth()
public Integer getHeight()
public Integer getMaxWidth()
width, the resulting image will be downscaled to fit in the boundaries box
defined by maximum width and height (when specified).
Can be used to scale an image to fit inside this box without having to specify width or height.public Integer getMaxHeight()
height, the resulting image will be downscaled to fit in the boundaries box
defined by maximum width and height (when specified).
Can be used to scale an image to fit inside this box without having to specify width or height.public AspectRatio getAspectRatio()
public Integer getDpi()
ImageModificationDto.getDensity() which will most likely be deprecated in the future.public CropDto getCrop()
public Integer getQuality()
1 and 100.
If not specified, the default quality configured on the application will be used.public ColorDto getBackgroundColor()
setAlphaColor(ColorDto).public ColorDto getAlphaColor()
# is supported.public ColorSpaceDto getColorSpace()
public ImageTypeDto getOutputType()
public void setScene(Integer scene)
public void setWidth(Integer width)
public void setHeight(Integer height)
public void setMaxWidth(Integer maxWidth)
width, the resulting image will be downscaled to fit in the boundaries box
defined by maximum width and height (when specified).
Can be used to scale an image to fit inside this box without having to specify width or height.public void setMaxHeight(Integer maxHeight)
height, the resulting image will be downscaled to fit in the boundaries box
defined by maximum width and height (when specified).
Can be used to scale an image to fit inside this box without having to specify width or height.public void setAspectRatio(AspectRatio aspectRatio)
public void setDpi(Integer dpi)
ImageModificationDto.getDensity() which will most likely be deprecated in the future.public void setCrop(CropDto crop)
public void setQuality(Integer quality)
1 and 100.
If not specified, the default quality configured on the application will be used.public void setBackgroundColor(ColorDto backgroundColor)
setAlphaColor(ColorDto).public void setAlphaColor(ColorDto alphaColor)
# is supported.public void setColorSpace(ColorSpaceDto colorSpace)
public void setOutputType(ImageTypeDto outputType)
protected boolean canEqual(Object other)
Copyright © 2020. All rights reserved.