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

PNG Compression Level

Engaged ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

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

Views

3.1K

Translate

Translate

Report

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

Copy link to clipboard

Copied

"None/Fast" -> compression=0

"Smallest/Slow" -> compression=9

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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