public final class JPEGQuality extends Object
Constructor and Description |
---|
JPEGQuality() |
Modifier and Type | Method and Description |
---|---|
static float |
getJPEGQuality(ImageInputStream input)
Determines an approximate JPEG compression quality value from the quantization tables.
|
static float |
getJPEGQuality(List<JPEGSegment> segments)
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.DQT
public 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.DQT
public static JPEGQTable[] getQTables(List<JPEGSegment> segments) throws IOException
IOException
public static void main(String[] args) throws IOException
IOException
Copyright © 2017. All rights reserved.