Java Code Examples for javax.imageio.ImageWriteParam#getCompressionMode()
The following examples show how to use
javax.imageio.ImageWriteParam#getCompressionMode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TIFFDeflater.java From Bytecoder with Apache License 2.0 | 6 votes |
public TIFFDeflater(String compressionType, int compressionTagValue, ImageWriteParam param, int predictorValue) { super(compressionType, compressionTagValue, true); this.predictor = predictorValue; // Set the deflate level. int deflateLevel; if(param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { float quality = param.getCompressionQuality(); deflateLevel = (int)(1 + 8*quality); } else { deflateLevel = Deflater.DEFAULT_COMPRESSION; } this.deflater = new Deflater(deflateLevel); }
Example 2
Source File: TIFFDeflater.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public TIFFDeflater(String compressionType, int compressionTagValue, ImageWriteParam param, int predictorValue) { super(compressionType, compressionTagValue, true); this.predictor = predictorValue; // Set the deflate level. int deflateLevel; if(param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { float quality = param.getCompressionQuality(); deflateLevel = (int)(1 + 8*quality); } else { deflateLevel = Deflater.DEFAULT_COMPRESSION; } this.deflater = new Deflater(deflateLevel); }
Example 3
Source File: BMPImageWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 4
Source File: BMPImageWriter.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 5
Source File: BMPImageWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 6
Source File: BMPImageWriter.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 7
Source File: BMPImageWriter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 8
Source File: BMPImageWriter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 9
Source File: BMPImageWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 10
Source File: BMPImageWriter.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 11
Source File: BMPImageWriter.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 12
Source File: BMPImageWriter.java From Bytecoder with Apache License 2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 13
Source File: BMPImageWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 14
Source File: BMPImageWriter.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 15
Source File: BMPImageWriter.java From JDKSourceCode1.8 with MIT License | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 16
Source File: BMPImageWriter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 17
Source File: BMPImageWriter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }
Example 18
Source File: BMPImageWriter.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) { BMPMetadata meta = new BMPMetadata(); meta.bmpVersion = VERSION_3; meta.compression = getPreferredCompressionType(imageType); if (param != null && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) { meta.compression = BMPCompressionTypes.getType(param.getCompressionType()); } meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize(); return meta; }