Comments (9)
Hey YandexStudio, you should be getting color images by default. Have you tried on multiple sets of images? If so, can you send me a pair of that produces black and white output, where the original pictures are in color?
from diffimg.
Emmmm, one pair is my origin game screenshot and its lossy compressed one, another pair is pure color, both of them returns black-white result.
game-screenshot lossy compressed
Environment:
Ubuntu 18.04 under WSL, Winows 10 1803
I use the default command
pip install diffimg
diffimg input.png input01.png output.png
from diffimg.
Here are the results I get when diffing your images (the first two would not work until I removed the alpha channel from the first image - I need to add to the docs that images must be the same size and have the same channels):
I'm not sure why yours are different, or why PIL did not complain for you about the alpha channel difference in the first pair of pictures. I think this may have to do with using WSL. I'll try to test it on a similar environment as well.
from diffimg.
Could you please tell all the dependency of this tool?
I only installed graphviz
( in Ubuntu under WSL, I run diffimg
and it said command not found, suggesting me install this, after install this, it can runs, but in CentOS, the system don't show any suggestions with "maybe missed package", just retruns "command not found" and I manually install this)
I've tried on CentOS 7 and also returns black-white result.
Also, this time I removed alpha channel with
convert input.png -alpha off input-no-alpha.png
So I think this issue may not related with alpha channel, I think maybe I lose some dependence package, and maybe that cause this.
from diffimg.
My diffimg
is not available as a standalone shell command, only through python. The way to run it is:
python -m diffimg <im1> <im2>
I believe you are using this diffimg
: https://manpages.debian.org/jessie/graphviz/diffimg.1.en.html
The only dependency is the python library pillow
which should be installed if you did pip install diffimg
.
from diffimg.
@YandexStudio Did this solve your problem?
from diffimg.
Yes, it works now, correctly. But why if I don't specify a output file name,it then output a JPG?I think the differ shouldn't be compressed.
from diffimg.
@YandexStudio That's an excellent point. I've just pushed a version that allows you to save the diff image as a .png
and preserve the alpha channel. I have not changed the default output name yet, but I think you're right that it should eventually be the default. On the next major version (0.2.0) I'll have it be .png
by default, I think the 0.1.x versions should not change the defaults as to not break anything for current users.
For now, specify the .png
extension manually and I think you should be able to achieve what you want.
Thanks for your suggestion though. Is there anything else about the module that isn't ideal for your workflow? If not, I'll close the issue.
from diffimg.
No, I think currently all my questions are solved. Thanks for your patience.
from diffimg.
Related Issues (6)
- Difference ratio calculated incorrectly HOT 2
- difference image is not convenient for png HOT 3
- Different size not taken into account. Is it possible to scale one to the format or size of the other? HOT 2
- Add another diff function that can take PIL.Images instead of filenames
- test_different_image_sizes: very slightly different ratio on python 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffimg.