Skip to content

Add support for pasting an image in the page, and a grayscale button#2

Open
AmineI wants to merge 2 commits intoyangcha:masterfrom
AmineI:paste-image
Open

Add support for pasting an image in the page, and a grayscale button#2
AmineI wants to merge 2 commits intoyangcha:masterfrom
AmineI:paste-image

Conversation

@AmineI
Copy link
Copy Markdown

@AmineI AmineI commented Sep 6, 2020

Hi there !

I found your work quite impressive, being able to do this in browser ! So I wanted to add a few helpful additions :

  • Pressing CTRL+V on the page with an image in the clipboard will load this image.
    Helpful when you keep screenshotting and pasting in there !

Just keep in mind that clicking somewhere on the canvas will overwrite your clipboard with the coordinates. This got me tearing my hair out, not understanding why it was not working. When I finally opened a clipboard manager, I noticed that I had coordinates in there, so not much it could paste.

  • An additional button changes the image to grayscale.
    Sometimes life's better in black and white, huh ?

AmineI added 2 commits June 15, 2020 18:58
Using the grayscale function from MDN Web docs
Adding files like that does not fire a change event for the input, so a modification of handleImageFiles() was required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant