Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -quiet to convert_args #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

japanese-bird
Copy link

With newer versions of libpng (mine is 1.6.12) it will throw some form of error when using programs like imagemagick, gimp, etc. with a png image with a certain (incorrect?) color profile, sRGB IEC61966-2.1 specifically.

There is bug reports all over the web about this (mainly regarding GIMP, because it will actually refuse to save the image with that color profile), but apparently this is intentional behavoir from libpng, not a bug.

Anyway, the exact error imagemagick's convert will give out when converting is convert: iCCP: known incorrect sRGB profile example.png' @ warning/png.c/MagickPNGWarningHandler/1832.`

This however is just a warning, it converts the image fine and returns a 0 exit status. The problem comes in with Tinyboard's way of handling imagemagick errors in inc/image.php apparently, any output is considered an error I think. Point is it would convert the image just fine, except Tinyboard sees that extra output as an error and will just take you to the error page, say "Failed to resize image", and won't let you post.

Please pull this, or if you want re-configure the way it would detect errors, I tried but I'm not that great of a programmer.

@czaks
Copy link
Contributor

czaks commented Aug 18, 2014

quick question: does your patch actually fix the issue? we have another code in our vichan fork of Tinyboard, though I would take your patch, provided that it works

@japanese-bird
Copy link
Author

Yes it does fix the issue, and it keeps the error functionality working in the case of actual errors.

It just stops non-fatal warning messages from imagemagick, which I think are getting taken as errors (exit status is still 0, everything works fine as it should). Personally I think that might be a better idea to look into why it does that, but it's not a big deal, just stopping imagemagick from being verbose works too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants