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

silent error with wide images #33

Open
dgutson opened this issue Apr 12, 2023 · 2 comments
Open

silent error with wide images #33

dgutson opened this issue Apr 12, 2023 · 2 comments

Comments

@dgutson
Copy link

dgutson commented Apr 12, 2023

git-diff-image silently fails with wide images.
By doing this change:

diff --git a/diff-image b/diff-image
index 1da14a4..0dbcfdb 100755
--- a/diff-image
+++ b/diff-image
@@ -195,7 +195,7 @@ density_flag=
 do_compare()
 {
     compare $density_flag $color_flag $fuzz_flag $backgroundcolor_flag "$f1" "$f2" png:- | \
-        montage $density_flag -geometry +4+4 $backgroundcolor_flag "$f1" - "$f2" png:- >"$destfile" 2>/dev/null || true
+        montage $density_flag -geometry +4+4 $backgroundcolor_flag "$f1" - "$f2" png:- >"$destfile"
 }

 if which xdg-open > /dev/null

compare throws this error:

montage-im6.q16: width or height exceeds limit `png:-' @ error/cache.c/OpenPixelCache/3909.

Please allow larger images, and consider some sort of error reporting.

@dgutson
Copy link
Author

dgutson commented Apr 12, 2023

The workaround I found was to modify
sudo nano /etc/ImageMagick-6/policy.xml
duplicating the width:
<policy domain="resource" name="width" value="32KP"/>
(it was 16KP originally).

Maybe there is a flag to override this policy.

@ewanmellor
Copy link
Owner

I don't remember why I'm squelching errors from montage there. It's been there since day 1. I presume it's noisy in some other situation; I wouldn't have done that otherwise. If we can get montage to be quiet normally then that would be best.

If there's a flag to override the policy setting I'd happily take that patch, but I can't find it in their documentation.

Marking this as "help wanted" for now.

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

No branches or pull requests

2 participants