-
Notifications
You must be signed in to change notification settings - Fork 30
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
Exact mode, no-comparison-image mode & updated exit codes for diff-image #36
Comments
So yes, I'd be happy to take those patches. Are you sure you want to put them here though? It sounds like whatever you're doing might just be better working directly with ImageMagick. Is |
I found your project when I was looking for various image comparison features. Given that I'm implementing them for myself, I figured it makes sense to share them so others can use them, too, and that it's better to have one good tool (yours) that provides all the functionality instead of 2 separate tools with slightly different capabilities. I've made some other improvements while understanding your script which I'd be happy to also share. Many of them just simplify the code & simultaneously make it more performant, while some improve, in my mind, the stdout output; if you prefer the existing or other output, I can modify my changes to conform to your preference. Do you want a bunch of small PRs, or could I just submit one PR, then you tell me if you want me to back out or modify any of my proposed changes? Let me know what works for you. |
Smaller PRs would be best, thanks. They're easier to review that way. I don't mind adding extra features. The principles I'll be sticking to are:
After that, I don't mind adding extra flags or output options or whatever. |
Thanks. I'll open PRs one at a time starting with simple cleanup ones, then non-output changes, then output changes. I don't have Linux to test, but I can test on macOS. |
Would you accept a PR (or separate PRs) for
diff-image
that:-f 0
? (i.e. does 0 fuzz require an exact match?). If not already handled by-f 0
, this could be specified by-f x
or-x
(the latter should either be mutually exclusive with-f
, or one should always override the other, or there should be a defined order precedence, like first argument is used or last argument is used)identify -format %# <file>
could be run for each argument file & compared, which seems to be faster than thecompare
. If "exact mode" isn't specified, and ifcompare
can output programmatic values other than equals/not equals (like "10% different", or "491 pixels different"), then that info could be included in the stdout message.0: both metadata & image data same
1: metadata different, image data same
2: metadata same, image data different
3: both metadata & image data different
-1: error (could have different negatives for different errors as negative exit codes count down from 255)
The text was updated successfully, but these errors were encountered: