Class ReadOp


  • public class ReadOp
    extends Operation
    Author:
    Fabrizio Giudici
    • 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 read
        imageIndex - 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 read
        imageIndex - the index of the image to read
        thumbnailIndex - 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.IOException
        Creates 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.IOException
        Returns a valid ImageReader for the given URL, or throw an IOException if it's not possible.
        Parameters:
        url - the URL
        Throws:
        java.io.IOException - if it is not possible