You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a png paths list could be passed via stdin it would be easier to optimize a subset of a collection of images ( in my use case this subset is unoptimized images ) while still leveraging oxipng's great built-in thread spawning to churn through them efficiently
The text was updated successfully, but these errors were encountered:
Yes, printf '%s\n' *.png | tr '\n' '\0' | xargs -0 oxipng is (minus corner cases related to ARG_MAX) identical to oxipng *.png. xargs -n1 is what would make a single call per file.
But well, since oxipng does nothing with its stdin (I think?), it'd be cool to read it and add PNGs to the work queue asynchronously (something xargs can't do).
# files will be processed 1 by 1 (i.e. not in parallel) and oxipng will be multithreaded
fd . --extension png --threads 1 --exec oxipng --preserve --opt max {}
# or with short flags
fd . -e png -j 1 -x oxipng -p -o max {}
# alternatively, run N threads for N files with single-threaded `oxipng`
fd . -e png -x oxipng -t 1 -p -o max {}
If a png paths list could be passed via stdin it would be easier to optimize a subset of a collection of images ( in my use case this subset is unoptimized images ) while still leveraging oxipng's great built-in thread spawning to churn through them efficiently
The text was updated successfully, but these errors were encountered: