Giter Site home page Giter Site logo

Blending algorithm about jspaint HOT 5 OPEN

1j01 avatar 1j01 commented on May 22, 2024 1
Blending algorithm

from jspaint.

Comments (5)

elamperti avatar elamperti commented on May 22, 2024

It is a resizing issue (blending is how the colors mix). After playing with different canvas sizes, I think it's computing only some of the pixels in the line instead of using all of them (which is why ms paint creates a gradient).

from jspaint.

1j01 avatar 1j01 commented on May 22, 2024

MS Paint in Win98/95, which is what jspaint is mainly a clone of, doesn't seem to support this,
although I could add it as an option, probably without too much difficulty (if my Win10 install wasn't super broken rn)

(you can try it here if you want: https://copy.sh/v86/?profile=windows98)

from jspaint.

shaunlebron avatar shaunlebron commented on May 22, 2024

Played with imageSmoothQuality to see if possible, but I couldn't quite get a clean gradient:

screen shot 2018-01-18 at 3 26 22 pm

from jspaint.

1j01 avatar 1j01 commented on May 22, 2024

@Mikejmoffitt points out selections are always scaled with nearest neighbor sampling.

from jspaint.

1j01 avatar 1j01 commented on May 22, 2024


Looks like gradients work in the Windows XP version, but not Windows 98.
JS Paint is primarily targeting parity with Windows 98. I'm not ruling out this feature, because it seems fun to support various old hacks, but I'm not interested in working on it at this point.

MS Paint might use "box sampling" so that all pixels contribute to the output.

from jspaint.

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.