Package se.datadosen.jalbum
Class ImageRenderer
java.lang.Object
se.datadosen.jalbum.ImageRenderer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildSrcset
(List<Rendition> renditions, String typicalPath) Generate a srcset attribute value for given list of renditionsgetCloseupRenditions
(OutputFormat format) getThumbRenditions
(OutputFormat format) static Rendition
getTypical
(List<Rendition> renditions) static boolean
isSameBase
(String testName, AlbumObject typicalAO) static boolean
isSameRoot
(String testName, String typicalName) static boolean
Test if passed test file is a variant of typicalFile, i.e.follows the -nnnw pattern where nnn is the image widthstatic boolean
isVariant
(String testName, AlbumObject typicalAO) static String
static String
nameSuffix
(String name) stripTypical
(List<Rendition> renditions)
-
Constructor Details
-
ImageRenderer
- Throws:
IOException
-
-
Method Details
-
getAndResetIntermediateImage
- Returns:
- Scaled image to be passed to the thumbnail processing stage
-
getCloseupRenditions
- Returns:
- Closeup (image) renditions, from largest to smallest. Includes the typical/base rendition too
-
getThumbRenditions
- Returns:
- Thumbnail renditions, from largest to smallest. Includes the typical/base rendition too
-
getCloseupRenditions
- Parameters:
format
- Specific image format to filter list on- Returns:
- Closeup (image) renditions, from largest to smallest. Includes the typical/base rendition too
-
getThumbRenditions
- Parameters:
format
- Specific image format to filter list on- Returns:
- Thumbnail renditions, from largest to smallest. Includes the typical/base rendition too
-
getTypical
-
stripTypical
-
buildSrcset
Generate a srcset attribute value for given list of renditions- Parameters:
renditions
- Valid list or nulltypicalPath
-- Returns:
- srcset string or null if renditions argument is null
-
isVariant
Test if passed test file is a variant of typicalFile, i.e.follows the -nnnw pattern where nnn is the image width- Parameters:
testName
-typicalName
-- Returns:
-
isVariant
-
isSameBase
-
isSameRoot
-
nameRoot
-
nameSuffix
-