List of usage examples for org.apache.commons.imaging.formats.tiff.constants TiffConstants TIFF_COMPRESSION_CCITT_GROUP_3
int TIFF_COMPRESSION_CCITT_GROUP_3
To view the source code for org.apache.commons.imaging.formats.tiff.constants TiffConstants TIFF_COMPRESSION_CCITT_GROUP_3.
Click Source Link
From source file:pl.edu.icm.visnow.lib.utils.ImageUtilities.java
public static void writeTiff(BufferedImage img, int compression, File file) throws IOException { if (img == null) { return;//ww w . j a v a 2 s.c o m } final ImageFormat format = ImageFormats.TIFF; final Map<String, Object> params = new HashMap<String, Object>(); switch (compression) { case TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED: case TiffConstants.TIFF_COMPRESSION_CCITT_1D: case TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3: case TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_4: case TiffConstants.TIFF_COMPRESSION_LZW: case TiffConstants.TIFF_COMPRESSION_PACKBITS: //case TiffConstants.TIFF_COMPRESSION_JPEG: break; default: compression = TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED; } ; params.put(ImagingConstants.PARAM_KEY_COMPRESSION, new Integer(compression)); try { Imaging.writeImage(img, file, format, params); } catch (ImageWriteException ex) { throw new IOException(ex); } }