Package it.tidalwave.image.op
Class ReadOp
- java.lang.Object
-
- it.tidalwave.image.op.Operation
-
- it.tidalwave.image.op.ReadOp
-
public class ReadOp extends Operation
- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceReadOp.OptionsA marker interface for allowable options forReadOpconstructor.static classReadOp.PluginBlackListA container of plugin names that should not be used to load an image.static classReadOp.Type
-
Constructor Summary
Constructors Constructor Description ReadOp(java.lang.Object input)ReadOp(java.lang.Object input, int imageIndex, int thumbnailIndex, ReadOp.Options... options)ReadOp(java.lang.Object input, int imageIndex, ReadOp.Options... options)ReadOp(java.lang.Object input, ReadOp.Options... options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.imageio.ImageReadercreateImageReader(java.io.File file, ReadOp.PluginBlackList pluginBlackList)Creates an ImageReader for the given File.static javax.imageio.ImageReadercreateImageReader(java.net.URL url, ReadOp.PluginBlackList pluginBlackList)Returns a validImageReaderfor the given URL, or throw anIOExceptionif it's not possible.EditableImageexecute()
-
-
-
Constructor Detail
-
ReadOp
public ReadOp(@Nonnull java.lang.Object input)- Parameters:
input- the input (an ImageReader or a File)
-
ReadOp
public ReadOp(@Nonnull java.lang.Object input, @Nonnull ReadOp.Options... options)- Parameters:
input- the input (an ImageReader or a File)type- the type of read
-
ReadOp
public ReadOp(@Nonnull java.lang.Object input, @Nonnegative int imageIndex, @Nonnull ReadOp.Options... options)- Parameters:
input- the input (an ImageReader or a File)type- the type of readimageIndex- the index of the image to read
-
ReadOp
public ReadOp(@Nonnull java.lang.Object input, @Nonnegative int imageIndex, @Nonnegative int thumbnailIndex, @Nonnull ReadOp.Options... options)- Parameters:
input- the input (an ImageReader or a File)type- the type of readimageIndex- the index of the image to readthumbnailIndex- the index of the thumbnail to read
-
-
Method Detail
-
execute
@Nonnull public EditableImage execute() throws java.io.IOException
- Throws:
java.io.IOException
-
createImageReader
@Nonnull public static javax.imageio.ImageReader createImageReader(@Nonnull java.io.File file, @Nonnull ReadOp.PluginBlackList pluginBlackList) throws java.io.IOExceptionCreates an ImageReader for the given File. Using a File as argument is important for photos that are stored in multiple files (e.g. Canon .CRW format). This method supports files GZIP compression (but multiple file formats such as .CRW aren't supported in this case).- Throws:
java.io.IOException- if it is not possible
-
createImageReader
@Nonnull public static javax.imageio.ImageReader createImageReader(@Nonnull java.net.URL url, @Nonnull ReadOp.PluginBlackList pluginBlackList) throws java.io.IOExceptionReturns a validImageReaderfor the given URL, or throw anIOExceptionif it's not possible.- Parameters:
url- the URL- Throws:
java.io.IOException- if it is not possible
-
-