Skip to content

Race condition in verbose output #572

Open
@mistydemeo

Description

@mistydemeo

In 9.0.0, with verbose output enabled, if I process multiple files at once the verbose logs are chaotically intermixed in a way that makes it difficult to tell which logs have to do with which input image. Here's a sample:

Processing: gn00015.png
Processing: gn00002.png
Processing: gn00006.png
Processing: gn00005.png
Processing: gn00007.png
Processing: gn00017.png
Processing: gn00000.png
Processing: gn00010.png
    512x343 pixels, PNG format
    8-bit RGB, non-interlaced
    IDAT size = 227717 bytes
    File size = 230974 bytes
Trying: 10 filters
    512x343 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 20235 bytes
    File size = 23527 bytes
    512x343 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 26606 bytes
    File size = 29898 bytes
Reducing image to 8-bit RGB, non-interlaced
Trying: 10 filters
    512x343 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 210150 bytes
    File size = 213514 bytes
    512x343 pixels, PNG format
    8-bit RGB + Alpha, non-interlaced
    IDAT size = 251942 bytes
    File size = 255318 bytes

By comparison, here's the same command run in 8.0.0:

Processing: gn00000.png
    512x343 pixels, PNG format
    3x8 bits/pixel, RGB (non-interlaced)
    IDAT size = 227717 bytes
    File size = 230974 bytes
Trying: 10 filters
    zc = 12  f = Average  >227726 bytes
    zc = 12  f = Paeth    >227726 bytes
    zc = 12  f = Up       >227726 bytes
    zc = 12  f = Sub      >227726 bytes
    zc = 12  f = Entropy  >227726 bytes
    zc = 12  f = None     >227726 bytes
    zc = 12  f = MinSum   >227726 bytes
    zc = 12  f = Bigrams  >227726 bytes
    zc = 12  f = BigEnt   >227726 bytes
    zc = 12  f = Brute    >227726 bytes
    IDAT size = 227717 bytes (0 bytes decrease)
    file size = 230974 bytes (0 bytes = 0.00% decrease)
File already optimized
Processing: gn00001.png
    512x343 pixels, PNG format
    3x8 bits/pixel, RGB (non-interlaced)
    IDAT size = 20307 bytes
    File size = 23564 bytes
Trying: 10 filters
    zc = 12  f = None      20302 bytes
    zc = 12  f = MinSum   >20316 bytes
    zc = 12  f = Bigrams  >20316 bytes
    zc = 12  f = Up       >20316 bytes
    zc = 12  f = BigEnt   >20316 bytes
    zc = 12  f = Entropy  >20316 bytes
    zc = 12  f = Sub      >20316 bytes
    zc = 12  f = Paeth    >20316 bytes
    zc = 12  f = Average  >20311 bytes
    zc = 12  f = Brute    >20311 bytes
Found better combination:
    zc = 12  f = None      20302 bytes
    IDAT size = 20302 bytes (5 bytes decrease)
    file size = 23559 bytes (5 bytes = 0.02% decrease)
Output: gn00001.png

The input command is oxipng -omax --verbose --alpha $files

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-MinorIssues that would be nice to have fixed, but are the lowest priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions