package org.bib.jeffrey; import java.awt.image.BufferedImage; import java.io.File; import java.util.List; public interface TiffService { /** * Create a multi page tiff from a set of tiffs loaded from the location specified by the path pattern, * output to a tiff file specified by the outputPath, with each tiff compressed using the argument * compression type. * * @param pathPattern Ant style path pattern to locate images, never empty/null * @param outputFile File where bytes will be written, never null, must point to a writable file location * @param compressionType A String representing the algorithm used to compress the individual tiffs, ie None, LZW, PackBits, etc */ public void toMultiPageTiff(String pathPattern, File outputFile, String compressionType); /** * Load images using the argument path pattern to locate the files to load * @param pathPattern Ant style path pattern to locate images * @return A List of BufferedImage instances, one for each found image */ public List loadImages(String pathPattern); /** * Create a multi page tiff by combining all the argument images into one. * @param images The images to combine, may be empty but never null * @return A byte array representing the multi page tiff */ public byte[] createMultiPageTiff(List images, String compressionType); /** * Write a byte array to the file system * * @param outputFile File where bytes will be written, never null, must point to a writable file location * @param bytes The bytes to write, may be empty but never null */ public void writeBytesToFile(File outputFile, byte[] bytes); }