public final class JPEGQuality
extends java.lang.Object
| Constructor and Description |
|---|
JPEGQuality() |
| Modifier and Type | Method and Description |
|---|---|
static float |
getJPEGQuality(javax.imageio.stream.ImageInputStream input)
Determines an approximate JPEG compression quality value from the quantization tables.
|
static float |
getJPEGQuality(java.util.List<JPEGSegment> segments)
Determines an approximate JPEG compression quality value from the quantization tables.
|
static javax.imageio.plugins.jpeg.JPEGQTable[] |
getQTables(java.util.List<JPEGSegment> segments) |
static void |
main(java.lang.String[] args) |
public static float getJPEGQuality(java.util.List<JPEGSegment> segments) throws java.io.IOException
[0...1], where 1 is the best possible value.segments - a list of JPEG segments containing the DQT quantization tables.[0...1], representing the JPEG quality,
or -1 if the quality can't be determined.javax.imageio.IIOException - if a JPEG format error is found during parsing.java.io.IOException - if an I/O exception occurs during parsing.ImageWriteParam.setCompressionQuality(float),
JPEG.DQTpublic static float getJPEGQuality(javax.imageio.stream.ImageInputStream input)
throws java.io.IOException
[0...1], where 1 is the best possible value.input - an image input stream containing JPEG data.[0...1], representing the JPEG quality,
or -1 if the quality can't be determined.javax.imageio.IIOException - if a JPEG format error is found during parsing.java.io.IOException - if an I/O exception occurs during parsing.ImageWriteParam.setCompressionQuality(float),
JPEG.DQTpublic static javax.imageio.plugins.jpeg.JPEGQTable[] getQTables(java.util.List<JPEGSegment> segments) throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionCopyright © 2021. All Rights Reserved.