Package org.javlo.image
Class ImageConfig
- java.lang.Object
-
- org.javlo.image.ImageConfig
-
public class ImageConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageConfig.ImageParameters
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
alignToGrid(int size, int grid)
Color
getAdjustColor(Device device, String filter, String area)
Color
getAlpha(Device device, String filter, String area)
Color
getBGColor(Device device, String filter, String area)
Color
getBluringBorderBgColor(Device device, String filter, String area)
Integer
getBluringBorderDirection(Device device, String filter, String area)
int
getBluringBorderWidth(Device device, String filter, String area)
float
getBrightness(Device device, String filter, String area)
float
getConstrast(Device device, String filter, String area)
int
getDashed(Device device, String filter, String area)
String
getFileExtension(Device device, String filter, String area)
List<String>
getFilters()
int
getFolderHeight(Device device, String filter, String area)
int
getFolderThumbHeight(Device device, String filter, String area)
int
getFolderThumbWidth(Device device, String filter, String area)
int
getFolderWidth(Device device, String filter, String area)
int
getGridHeight(Device device, String filter, String area)
int
getGridWidth(Device device, String filter, String area)
int
getHeight(Device device, String filter, String area)
static ImageConfig
getInstance(GlobalContext globalContext, javax.servlet.http.HttpSession session, Template template)
String
getLayer(Device device, String filter, String area)
int
getMarginBottom(Device device, String filter, String area)
int
getMarginLeft(Device device, String filter, String area)
int
getMarginRigth(Device device, String filter, String area)
int
getMarginTop(Device device, String filter, String area)
int
getMaxHeight(Device device, String filter, String area)
int
getMaxWidth(Device device, String filter, String area)
static ImageConfig
getNewInstance(GlobalContext globalContext, javax.servlet.http.HttpSession session, Template template)
ProjectionConfig
getProjection(GlobalContext globalContext, Template template, Device device, String filter, String area)
ConfigurationProperties
getProperties()
Color
getReplaceAlpha(Device device, String filter, String area)
int
getResizeDashed(Device device, String filter, String area)
int
getSepiaIntensity(Device device, String filter, String area)
Color
getTrimColor(Device device, String filter, String area)
return a bg color, the border with this color will be removed.int
getTrimTolerance(Device device, String filter, String area)
return tolerance for trim (0 >> 255*3)int
getWeb2Height(Device device, String filter, String area)
int
getWeb2Separation(Device device, String filter, String area)
int
getWidth(Device device, String filter, String area)
double
getZoom(Device device, String filter, String area)
boolean
isAddBorder(Device device, String filter, String area)
boolean
isAddImageBorder(Device device, String filter, String area)
boolean
isBackGroudColor(Device device, String filter, String area)
boolean
isBluringBorder(Device device, String filter, String area)
boolean
isCropResize(Device device, String filter, String area)
boolean
isCrystallize(Device device, String filter, String area)
boolean
isEdge(Device device, String filter, String area)
boolean
isEmboss(Device device, String filter, String area)
boolean
isFilter(String filter)
boolean
isFocusZone(Device device, String filter, String area)
boolean
isFolderThumbShuffle(Device device, String filter, String area)
boolean
isFraming(Device device, String filter, String area)
boolean
isGlow(Device device, String filter, String area)
boolean
isGrayscale(Device device, String filter, String area)
boolean
isGrayscaleAveraging(Device device, String filter, String area)
boolean
isGrayscaleDesaturation(Device device, String filter, String area)
boolean
isGrayscaleLuminosity(Device device, String filter, String area)
boolean
isHighQuality(Device device, String filter, String area)
boolean
isHorizontalFlip(Device device, String filter, String area)
boolean
isIndexed(Device device, String filter, String area)
boolean
isLogoBottomRigth(Device device, String filter, String area)
boolean
isRemoveBg(Device device, String filter, String area)
boolean
isRoundCorner(Device device, String filter, String area)
boolean
isVerticalFlip(Device device, String filter, String area)
boolean
isWeb2(Device device, String filter, String area)
static void
main(String[] args)
String
printConfig(Device device, String filter, String area)
-
-
-
Field Detail
-
logger
protected static Logger logger
create a static logger.
-
-
Method Detail
-
getNewInstance
public static ImageConfig getNewInstance(GlobalContext globalContext, javax.servlet.http.HttpSession session, Template template)
-
getInstance
public static ImageConfig getInstance(GlobalContext globalContext, javax.servlet.http.HttpSession session, Template template)
-
alignToGrid
public static int alignToGrid(int size, int grid)
-
isFilter
public boolean isFilter(String filter)
-
isFolderThumbShuffle
public boolean isFolderThumbShuffle(Device device, String filter, String area)
-
getTrimColor
public Color getTrimColor(Device device, String filter, String area)
return a bg color, the border with this color will be removed. (detect = automatic detect background color)- Parameters:
device
-filter
-area
-- Returns:
-
getTrimTolerance
public int getTrimTolerance(Device device, String filter, String area)
return tolerance for trim (0 >> 255*3)- Parameters:
device
-filter
-area
-- Returns:
-
isGrayscaleAveraging
public boolean isGrayscaleAveraging(Device device, String filter, String area)
-
isGrayscaleLuminosity
public boolean isGrayscaleLuminosity(Device device, String filter, String area)
-
isGrayscaleDesaturation
public boolean isGrayscaleDesaturation(Device device, String filter, String area)
-
getBluringBorderDirection
public Integer getBluringBorderDirection(Device device, String filter, String area)
-
getBluringBorderBgColor
public Color getBluringBorderBgColor(Device device, String filter, String area)
-
getProjection
public ProjectionConfig getProjection(GlobalContext globalContext, Template template, Device device, String filter, String area)
-
getProperties
public ConfigurationProperties getProperties()
-
-