Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PNG Compression Level

Engaged ,
Mar 27, 2019 Mar 27, 2019

I noticed in the Photoshop Scripting guide, PNGSaveOptions has a member called "compression", which takes an integer between 0 and 9, inclusive.

5uZQ2gw.png

However, I am confused as to what this value corresponds to.  In the GUI, when saving a PNG, the only options are these:

q3lsqcv.png

I'm not sure how a value between 0 and 9 corresponds to "None/Fast" or "Smallest / Slow".

Can somebody please explain what each of the 0-9 compression levels correspond to, or how they work?  I would appreciate some background.  Thanks.

TOPICS
Actions and scripting
3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
People's Champ ,
Mar 28, 2019 Mar 28, 2019

"None/Fast" -> compression=0

"Smallest/Slow" -> compression=9

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 28, 2019 Mar 28, 2019

So then what's everything in between?  (1-8)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 04, 2019 May 04, 2019

Does anybody know what the levels in between correspond to?  I have still been unable to locate this information.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2019 May 04, 2019

Why not experiment on a set of documents measure the differences in sized between sizes for each image save are all the compression levels. To get some idea the ranges,  Size differences will most likely be effected by the amount of detail in images so vary the amount of details in images.  You may also want to measure the amount of time leach level takes to compress the data. Time and space.

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 04, 2019 May 04, 2019

Surely there's documentation on the compression algorithm Adobe is using somewhere!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2019 May 05, 2019
LATEST

These are user forums. We do not work for Adobe. We do not have access to Phtoshop's code or internal Adobe documentation.  As far as I know PNG is not an Adobe image file format they can mess about with. Have you read up on Portable Network Graphics - Wikipedia 

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines