Skip to content
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

Blending algorithm #42

Open
chayleaf opened this issue Jan 18, 2018 · 5 comments
Open

Blending algorithm #42

chayleaf opened this issue Jan 18, 2018 · 5 comments

Comments

@chayleaf
Copy link

I don't really know the details, but mspaint allowed you to do gradients like this: http://www.nerdparadise.com/mspaint/lineargradient
which isn't possible in jspaint.

@elamperti
Copy link

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

@1j01
Copy link
Owner

1j01 commented Jan 18, 2018

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)

@shaunlebron
Copy link

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

@1j01
Copy link
Owner

1j01 commented Mar 4, 2020

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

@1j01
Copy link
Owner

1j01 commented Mar 5, 2020


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants