public class AdaptiveImageHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AdaptiveImageHelper.Quality
Defines values for a number of common qualities.
|
Constructor and Description |
---|
AdaptiveImageHelper() |
Modifier and Type | Method and Description |
---|---|
Layer |
applyStyleDataToImage(Image image,
Style style)
Applies style data to the given image, including crop and rotation.
|
static AdaptiveImageHelper.Quality |
getQualityFromString(java.lang.String imageQualityString)
Lookup Quality value from a String.
|
static Layer |
renderScaledPlaceholderImage(int width,
int height)
Renders a white rectangular layer with the given dimensions.
|
Layer |
scaleThisImage(Image image,
int newWidth,
int newHeight,
Style style)
Scales the given image to the dimensions specified by newWidth and newHeight.
|
public static AdaptiveImageHelper.Quality getQualityFromString(java.lang.String imageQualityString)
imageQualityString
- image qualitypublic Layer scaleThisImage(Image image, int newWidth, int newHeight, Style style) throws RepositoryException, java.io.IOException
image
- imagenewWidth
- desired widthnewHeight
- specify 0 to scale based on width and keep the current aspect ratiostyle
- style data including user defined crop and rotationRepositoryException
- if image can not be loadedjava.io.IOException
- if image can not be loadedpublic Layer applyStyleDataToImage(Image image, Style style) throws RepositoryException, java.io.IOException
image
- imagestyle
- styleRepositoryException
- if image can not be loadedjava.io.IOException
- if image can not be loadedpublic static Layer renderScaledPlaceholderImage(int width, int height)
width
- requested widthheight
- requested heightCopyright © 2010 - 2020 Adobe. All Rights Reserved