J
J
Jason Marketson2020-07-20 09:55:13
linux
Jason Marketson, 2020-07-20 09:55:13

How to find broken *.png file?

Good afternoon, help everyone who has been trying for several days to overcome the problem with apache, in general, as far as I understand, there is a broken png file on the site, since the error " libpng warning: iCCP: known incorrect sRGB profile " hangs in the logs, I found the reason on stackoverflow - "ibpng-1.6 checks ICC profiles more tightly than previous ones. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image." So, due to the fact that the warning "libpng warning: iCCP: known incorrect sRGB profile" is constantly written to the Apache log and once a day the log is cleared and apahe is restarted. So on the stackoverflow, a recommendation is given for finding broken files, namely "If you want to know which files to fix instead of blindly processing them all, you can run pngcrush -n -q *.png where -n means you don't overwrite files and -q means suppress the "technical" part of the output. except for warnings. Unfortunately, pngcrush doesn't yet have an option to suppress all "technical" messages other than warnings. ". I'm trying to use the pngcrush -n -q *.png command - but I only get the answer Could not find file: *.png
Has anyone encountered this? How to specify the parameters in pngcrush correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2020-07-20
@helison

...but I only get the answer Could not find file: *.png

Why are you handing non-existent files to tulza? Submit existing ones:
find . -type f -name "*.png" -exec pngcrush -n -q "{}" \;

D
Dmitry, 2020-07-20
@q2digger

What if something like this
for file in *.png; do pngcrush -n -q "$file"; done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question