Class ExtractedImage


  • public class ExtractedImage
    extends Object
    An extracted sub-image.
    • Constructor Detail

      • ExtractedImage

        public ExtractedImage​(BufferedImage image,
                              String filename,
                              String saveFormat)
        Parameters:
        image - Buffered image object.
        filename - Name of the extracted image.
        saveFormat - Format to save the image as, defaults to PNG.
    • Method Detail

      • writeToFile

        public void writeToFile​(String outputPath)
                         throws IOException
        Write the image to a file. Uses the default image format and filename.
        Parameters:
        outputPath - the output directory (must exist).
        Throws:
        IOException - Throws if the file can't be accessed.
      • getFilename

        public String getFilename()
      • getSaveFormat

        public String getSaveFormat()