Class ImageUtils
java.lang.Object
fr.paris.lutece.plugins.galleryimage.util.ImageUtils
Image utils class
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteArrayOutputStreamgetImageOutputStream(byte[] fileImage, String strImageWidth) Build an outputStream of an image from its byte array.static StringimageBase64(fr.paris.lutece.portal.service.image.ImageResource imageResource) imageBase64static booleansafeImage(byte[] fileImage) Checks if the image is safe
-
Method Details
-
getImageOutputStream
Build an outputStream of an image from its byte array. If strImageWidth parameter is filled in, the image is resized according to this width- Parameters:
fileImage- image byte arraystrImageWidth- image width- Returns:
- image outputStream
-
safeImage
public static boolean safeImage(byte[] fileImage) Checks if the image is safe- Parameters:
fileImage- image byte array- Returns:
- true if file is safe, false otherwise
-
imageBase64
imageBase64- Parameters:
imageResource-- Returns:
-