Git Product home page Git Product logo

Comments (3)

g-rden avatar g-rden commented on June 21, 2024

This is a side effect of anti-aliasing. If you use --force-aliasing or press shift-a it will be #ffffff. Something similar occurs with images without transparency: convert -size 2000x2000 xc:white png8:white.png. I don't know if the anti-aliasing could be better, but it's not unexpected for me. As long as an image is downscaled there are bound to be inaccuracies.

from feh.

taylordotfish avatar taylordotfish commented on June 21, 2024

You're right, it does also happen for images without an alpha channel. I didn't realize because the effect isn't as large—I guess there's a compounding effect with the addition of an alpha channel.

It's still somewhat surprising to me that artifacts would occur in the case where every pixel is the same, though. This is the easiest case for an anti-aliasing filter—all frequencies are 0. Intuitively, it should be possible to handle this without adding a DC offset.

I haven't looked through the code, but I have a small suspicion that somewhere in the anti-aliasing algorithm there are some floating-point values being truncated vs. rounded to the nearest integer, or an off-by-one error, or something similar.

from feh.

g-rden avatar g-rden commented on June 21, 2024

If I am not mistaken anti-aliasing is handled by imlib_context_set_anti_alias() from imlib2. I think https://git.enlightenment.org/old/legacy-imlib2 is the repo for it. That might be the correct place for this bug report.

from feh.

Related Issues (20)

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.