Class AbstractImageOperation
java.lang.Object
org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
- All Implemented Interfaces:
ImageOperation
- Direct Known Subclasses:
AbstractScaleImageOperation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(InputStream data, String mimeType) Deprecated.abstract void
execute
(InputStream data, ImageReader reader, ImageWriter writer) Executes a concrete image operation.protected ImageOperationResult
run
(InputStream data, String mimeType) Runs an image operation and returns the result.protected void
setResult
(InputStream data, int width, int height) protected static File
writeToTmpFile
(InputStream data)
-
Constructor Details
-
AbstractImageOperation
public AbstractImageOperation()
-
-
Method Details
-
writeToTmpFile
- Throws:
IOException
-
execute
Deprecated.Userun(InputStream, String)
insteadExecutes an image operation.- Throws:
GalleryException
-
run
Description copied from interface:ImageOperation
Runs an image operation and returns the result.- Specified by:
run
in interfaceImageOperation
- Parameters:
data
- the image data. The stream is closed by this method.mimeType
- MIME type of the image- Throws:
GalleryException
- when the image operation fails
-
setResult
-
getResult
-
execute
public abstract void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException Executes a concrete image operation.- Parameters:
data
- the image data. Closing the stream is the responsibility of the caller (i.e. this class).reader
- reader for the image datawriter
- writer for the image data- Throws:
IOException
- when the image operation fails
-
run(InputStream, String)
instead