franta-hg@6: /** franta-hg@6: * copy-image-resizer franta-hg@6: * Copyright © 2014 František Kučera (frantovo.cz) franta-hg@6: * franta-hg@6: * This program is free software: you can redistribute it and/or modify franta-hg@6: * it under the terms of the GNU General Public License as published by franta-hg@6: * the Free Software Foundation, either version 3 of the License, or franta-hg@6: * (at your option) any later version. franta-hg@6: * franta-hg@6: * This program is distributed in the hope that it will be useful, franta-hg@6: * but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@6: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@6: * GNU General Public License for more details. franta-hg@6: * franta-hg@6: * You should have received a copy of the GNU General Public License franta-hg@6: * along with this program. If not, see . franta-hg@6: */ franta-hg@6: package cz.frantovo.copyImageResizer; franta-hg@6: franta-hg@15: import java.io.InputStream; franta-hg@6: import java.io.OutputStream; franta-hg@6: franta-hg@6: /** franta-hg@6: * franta-hg@6: * @author Ing. František Kučera (frantovo.cz) franta-hg@6: */ franta-hg@17: public interface SingleImageResizer { franta-hg@7: franta-hg@15: /** franta-hg@15: * franta-hg@15: * @param input franta-hg@15: * @param output franta-hg@15: * @param size franta-hg@15: * @param outputFormat franta-hg@15: * @return whether image was resized → if false, you should just copy the image after calling franta-hg@15: * this method. Image is resized if larger than requested size or if {@linkplain SizeSpecification#isResizeSmaller() franta-hg@15: * }. franta-hg@15: * @throws ResizeException franta-hg@15: */ franta-hg@17: public boolean resize(InputStream input, OutputStream output, SizeSpecification size, JavaSingleImageResizer.ImageFormat outputFormat) throws ResizeException; franta-hg@6: }