top | item 22415735

MSPaint in JavaScript

512 points| whalesalad | 6 years ago |jspaint.app

125 comments

order
[+] thesandlord|6 years ago|reply
Photoshop in JavaScript: https://www.photopea.com/

I use it all the time, amazing it was created by a single person!

[+] crazygringo|6 years ago|reply
Oh my god that's literally insane. Sorry, but I am astonished by what it implements.

Layers? Path editing? Blending options? Content-aware fill? Convert text to shape? In a web browser?

I'm just blown away right now. I'm editing a 2000x3000 pixel image and it seems just as fast as my copy of actual Photoshop.

I can't even fathom how much work this must have been. One person? How is that even possible?

[+] greggman3|6 years ago|reply
BTW they made a very fast inflate lib which I repackaged (with permission) into an unzip library that AFAIK is 6 to 25x faster the most popular unzip library.

https://www.npmjs.com/package/unzipit

That speed mostly comes from their library.

Have not gotten around the making a corresponding zip library.

[+] aikah|6 years ago|reply
Nice. Although one of the hidden power of Photoshop is the ability to open ridiculous large image files without any hurdle whatsoever. The other day a client sent a 5GB comp we had to open to modify some text, I was surprised how well Photoshop handled it, on a relatively cheap laptop.

Not sure how it would fair in the browser.

[+] hmottestad|6 years ago|reply
That is actually super useful. I've already migrated diagrams to draw.io, and now I can do the same for simple photo editing. Super useful for work too, since a webpage is much easier than installing a program.
[+] OkGoDoIt|6 years ago|reply
I had originally assumed this was some sort of webassembly port of the actual Microsoft Paint source code. But it looks like a completely custom JavaScript app built from the ground up to look and work very similarly to Microsoft Paint. That’s actually super impressive, although not quite the technological feat I had originally assumed. It does make this more dubious from a trademark perspective, the author might want to make it more clear it’s not actually Microsoft Paint.
[+] joombaga|6 years ago|reply
They even replicated the 10x zoom easter egg (draw something and click the line below 8x zoom).
[+] AdmiralAsshat|6 years ago|reply
This is totally something that I could live with being an Electron app on Linux.

Yes, I should be using GIMP/Krita/Other community FOSS solution, but gosh darnit, sometimes I just wanna make a 20-second markup on a screenshot, and I wanna use the friggin' program that I have a 20-year muscle memory for!

[+] epicide|6 years ago|reply
The fact that at least 5 people have replied with different tools really just emphasizes your point.

Is it a perfect recreation? Of course not.

Will it do every sort of image editing I might want? A definite no.

Does everybody either quickly learn it or already have its interface burned into their memory? Yep.

Does it work well enough to do a quick edit on pretty much any OS (including mobile) without needing anything but a browser and an easy-to-remember link? YES.

[+] tomtheelder|6 years ago|reply
This app has really noticeable and irritating latency vs. native paint that would make it a pain for me to actually use.

If we are being honest that's probably an implementation thing, and not just a function of it being JS, but once gain performance problems in a JS app damage the experience for me.

[+] RodgerTheGreat|6 years ago|reply
Kolourpaint is a pretty decent linux-based alternative to MSPaint. Same simple featureset and straightforward UI, with the nice added touch of support for transparency.
[+] duckerude|6 years ago|reply
MS Paint itself can run in Wine. I believe you can install it with winetricks.
[+] dansman805|6 years ago|reply
Specifically for screenshot markup, I recommend using flameshot (https://flameshot.js.org/#/). It allows you to markup the screenshot right as you take it.
[+] thrower123|6 years ago|reply
Greenshot is my weapon of choice for that. Hit Print Screen, drag a box of what you want to capture, open in editor and annotate away

https://getgreenshot.org/

[+] chapium|6 years ago|reply
My preferred mspaint workflow:

1. Screenshot thing with screenshot rectangle selector (Win+S on OneNote 2013)

2. Draw red circles and arrows all over it

3. Repeat #1 on mspaint canvas

4. Paste screenshot with annotations to whatever I need pasting it to.

[+] krapp|6 years ago|reply
What would bundling this as an Electron app provide that just bookmarking the site wouldn't?

The whole thing probably takes less than a couple of megabytes.

[+] boomskats|6 years ago|reply
This is huge. I no longer have any reason to keep my Windows partition!
[+] mrtksn|6 years ago|reply
Ah, this could be used as the missing paint in macOS. Even taking a screenshot and dragging it inside the browser works as expected. Is there an easy wat to turn this into an app that can live locally?

Paint is the only thing I miss about Windows.

[+] KMnO4|6 years ago|reply
There’s an app called Fluid which allows you to run websites as thin Mac apps. It uses Safari instead of Electron so it’s not incredibly bloated.

https://fluidapp.com/

[+] jchw|6 years ago|reply
Presumably Electron, but it may be slightly more comfortable to compile something like KolourPaint for macOS instead.
[+] Luff|6 years ago|reply
Download and unzip NW.js, create a file called package.json with the following text:

  { "name": "JSPaint", "main": "https://jspaint.app/" }
Place it in the extracted folder, then start nw.
[+] microcolonel|6 years ago|reply
Normal MS Paint runs fine in Wine, I know somebody who uses it regularly.
[+] Fnoord|6 years ago|reply
Are there not image manipulation programs on macOS to your liking?
[+] rubyn00bie|6 years ago|reply
Get the real magic* with Konami mode:

up, up, down, down, left, right, left, right, b, a

* Magic being what I'd call a full 90s experience

[+] jtvjan|6 years ago|reply
Looks like this is part of a greater project, 98.js.org. Though, you could also add it as a shortcut to Windows 93[1] and it'd fit right in.

[1]: https://www.windows93.net/

[+] goda90|6 years ago|reply
Maybe this is false memory, but did old MSPaint have a "feature" where if you are holding down the left click button to draw with the pencil tool or something, and then you scroll the scroll-wheel, it creates a bunch of vertical lines along where you are drawing? I was sad that this didn't have that.
[+] qwerty456127|6 years ago|reply
Fun but not really useful. I bloody wish someone would implement Paint.Net (which is the most practical + intuitive picture editor ever IMHO) in JavaScript. It's cross-platform Mono clone, Pinta, is tolerable but not nearly as good.
[+] soheil|6 years ago|reply
Even the speed by which help articles load when clicked on in the Help Topics works the same way as ms paint. This is insane level of attention to details.

On a separate note, I love the Help Topics so much I think I will use it instead of ZenDesk guide pages on our SaaS website. It's so elegant and all contained in one booklet with extremely legible text and iconography. No bs web ui here.

[+] OkGoDoIt|6 years ago|reply
Works surprisingly well on iOS, although it’s difficult to select the menu items (small tap target), there doesn’t appear to be any way to right click, and the window size bleeds off the right edge of the screen. Still, much more impressive functionality and performance than I expected, especially since this doesn’t seem to be optimized for mobile!
[+] jsd1982|6 years ago|reply
The history to GIF is a neat feature but falls apart if your first operation is to invert colors or fill the image as black instead of default white. Having the ability to edit history would be nice (cut out the initial New Document history item) or be able to create a new image from the current one with history erased.
[+] eyelidlessness|6 years ago|reply
My favorite feature is that typing `cmd-[` (browser back) briefly rotates the canvas before the browser navigates back.
[+] jancsika|6 years ago|reply
Oh wow, there's a lot of attention to detail. The application menu looks perfect and is a lot snappier than I thought it would be for an HTML5 app.

On the other hand-- why do the toolbar buttons only trigger on mouseup? I thought they triggered on mousedown on the original MS Paint.

[+] thrower123|6 years ago|reply
I'd forgotten how much better the old Paint UI was compared to the newer edition...
[+] yoavm|6 years ago|reply
what strikes me the most is that the "modern" theme (from the "extras" menu) feels so much less user friendly than the "classic" one. where did it all go wrong?..
[+] jedberg|6 years ago|reply
This is awesome! I miss MS Paint. So much easier for markup.

One nit though, they should add a few sleep() in there so it feels like my old PC. :)