How to get image compression quality from IIOMetadata?
When saving a new image wit开发者_StackOverflow中文版h ImageIO
generic ImageWriteParam
supports explicit setting of compressionQuality
parameter from range 0.0f
(high compression) to 1.0f
(high quality) regardless of image compression algorithm used (eg. png, jpeg, gif).
- Is there any way to read
compressionQuality
from an existing image? - Is that
compressionQuality
write parameter just a hint toImageWriter
and is not stored anywhere in image's metadata? If that's true how image processing software (e.g. GIMP) manages to provide the following option in 'Save As' dialog?
I managed to read IIOMetadata
from ImageInputStream
and iterate through its metadataFormatNames
to print out image metadata in different XML formats (native and standard javax_imageio_1.0
, usually). Although I couldn't find any indication of image's compressionQuality
in there.
I don't think that compressionQuality is stored with image meta data, this is processing parameter only.
精彩评论