在Swift或Objective-C中,如何获取jpeg图像的当前压缩因子?

In Swift or Objective-C, how to get a jpeg image's current compression factor?

在 macOS 应用程序中使用 Swift 或 Objective-C,我需要一些片段来收集图像文件的当前 JPEG 压缩系数。任何帮助是极大的赞赏。谢谢

没有。

No, you can not and it does not make sense to do so, since there is no ubiquitous definition of the JPEG compression level. The actual result when saving a JPEG with compression level 60 in one software can differ significantly from what another software produces when set to level 60.

https://photo.stackexchange.com/questions/88167/is-it-possible-to-find-out-what-compression-ratio-was-used-for-a-particular-jpeg