org.apache.wicket.util.image
Class ImageUtil
java.lang.Object
org.apache.wicket.util.image.ImageUtil
public class ImageUtil
- extends Object
Util class to provide basic image functionality like converting image data to base64 content
- Since:
- 6.20.0
- Author:
- Tobias Soloschenko
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageUtil
public ImageUtil()
createBase64EncodedImage
public static CharSequence createBase64EncodedImage(PackageResourceReference imageReference,
boolean removeWhitespaces)
throws ResourceStreamNotFoundException,
IOException
- Creates a base64 encoded image string based on the given image reference
- Parameters:
imageReference
- the image reference to create the base64 encoded image string ofremoveWhitespaces
- if whitespaces should be removed from the output
- Returns:
- the base64 encoded image string
- Throws:
ResourceStreamNotFoundException
- if the resource couldn't be found
IOException
- if the stream couldn't be read
Copyright © 2006–2016 Apache Software Foundation. All rights reserved.