com.atlassian.jira.web.less.inlineimage
Class InlineImageEncoder
java.lang.Object
com.atlassian.jira.web.less.inlineimage.InlineImageEncoder
public class InlineImageEncoder
- extends Object
Translates an image into a base64 data URI for use in Less Transformer.
- Since:
- v5.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceLoader
public static ThreadLocal<LessTransformer.LessResource.BaseLoader> resourceLoader
InlineImageEncoder
public InlineImageEncoder()
encode
public static InlineImage encode(String imagePath)
- Encodes the given image in its base 64 representation.
- Parameters:
imagePath
- the path to the image to be encoded relative to the classpath.
- Returns:
- the base 64 representation of the image
encodeOptimized
public static InlineImage encodeOptimized(String imagePath)
- Encodes the given image in its base 64 representation, stripping all metadata.
- Parameters:
imagePath
- the path to the image to be encoded relative to the classpath.
- Returns:
- the base 64 representation of the image with all metadata stripped.
getLoader
public static LessTransformer.LessResource.BaseLoader getLoader()
setLoader
public static void setLoader(LessTransformer.LessResource.BaseLoader loader)
Copyright © 2002-2013 Atlassian. All Rights Reserved.