开发者

How to get image compression quality from IIOMetadata?

开发者 https://www.devze.com 2023-02-24 06:38 出处:网络
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 qualit

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 to ImageWriter 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?

How to get image compression quality from IIOMetadata?

How to get image compression quality from IIOMetadata?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号