Giter VIP home page Giter VIP logo

Comments (9)

nicolashahn avatar nicolashahn commented on May 29, 2024

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.

YandexStudio avatar YandexStudio commented on May 29, 2024

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 origin

game-screenshot lossy compressed

game -screenshot diff result

pure color input 01

pure color input 02

pure color diff result

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.

nicolashahn avatar nicolashahn commented on May 29, 2024

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):

yandex_1_2_diff

yandex_3_4_diff

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.

YandexStudio avatar YandexStudio commented on May 29, 2024

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.

nicolashahn avatar nicolashahn commented on May 29, 2024

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.

nicolashahn avatar nicolashahn commented on May 29, 2024

@YandexStudio Did this solve your problem?

from diffimg.

YandexStudio avatar YandexStudio commented on May 29, 2024

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.

nicolashahn avatar nicolashahn commented on May 29, 2024

@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.

YandexStudio avatar YandexStudio commented on May 29, 2024

No, I think currently all my questions are solved. Thanks for your patience.

from diffimg.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.