Class ImageBinary
java.lang.Object
org.hippoecm.frontend.plugins.gallery.imageutil.ImageBinary
- All Implemented Interfaces:
Binary
This class extends a
Binary
class with extra information regarding images: filename, mimetype and
color model. It uses the commons-imaging (formerly Sanselan) library to figure out the mimetype if none is provided. For SVG images
(which Sanselan does not recognize) the mimetype auto-detection is skipped and the color model is set to UNKNOWN.
Furthermore it converts YCCK and CMYK input into the RGB color model so it can be used by the JPEGImageReader. See
CMS7-5074 for more info.-
Field Summary
-
Constructor Summary
ConstructorDescriptionImageBinary
(Node node, InputStream stream, String fileName) ImageBinary
(Node parent, InputStream stream, String fileName, String mimeType) -
Method Summary
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Constructor Details
-
ImageBinary
- Throws:
GalleryException
-
ImageBinary
public ImageBinary(Node parent, InputStream stream, String fileName, String mimeType) throws GalleryException - Throws:
GalleryException
-
-
Method Details
-
getMimeType
-
getFileName
-
getColorModel
-
getStream
- Specified by:
getStream
in interfaceBinary
- Throws:
RepositoryException
-
read
- Specified by:
read
in interfaceBinary
- Throws:
IOException
RepositoryException
-
getSize
- Specified by:
getSize
in interfaceBinary
- Throws:
RepositoryException
-
dispose
public void dispose() -
toString
-