public final class JPEGQuality extends Object
| Constructor | Description |
|---|---|
JPEGQuality() |
| Modifier and Type | Method | Description |
|---|---|---|
static float |
getJPEGQuality(List<JPEGSegment> segments) |
Determines an approximate JPEG compression quality value from the quantization tables.
|
static float |
getJPEGQuality(ImageInputStream input) |
Determines an approximate JPEG compression quality value from the quantization tables.
|
static JPEGQTable[] |
getQTables(List<JPEGSegment> segments) |
|
static void |
main(String[] args) |
public static float getJPEGQuality(List<JPEGSegment> segments) throws 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.IIOException - if a JPEG format error is found during parsing.IOException - if an I/O exception occurs during parsing.ImageWriteParam.setCompressionQuality(float),
JPEG.DQTpublic static float getJPEGQuality(ImageInputStream input) throws 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.IIOException - if a JPEG format error is found during parsing.IOException - if an I/O exception occurs during parsing.ImageWriteParam.setCompressionQuality(float),
JPEG.DQTpublic static JPEGQTable[] getQTables(List<JPEGSegment> segments) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2018. All rights reserved.