Live data from Hacker News

MSPaint in JavaScript

jspaint.app

81–90 of 129 posts

Re: MSPaint in JavaScript

#81
post #73

Earlier quoted context omitted.

It's JavaScript. It runs on the client side.

The script do run on the client side, but it can't access images from your computer, so you will have to upload it first so it can access it from the server.

Yeah, but you don't upload it - you just make it accessible to the browser. So you read it into memory, but you would do the same with a "native" program (despite the fact that a very large file might be read more intelligently if it doesn't fit into RAM).

Re: MSPaint in JavaScript

#82
post #44

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 wan…

It would be hard to beat Fabrice Bellard in this game: https://bellard.org/jslinux/

Fascinating, so what happen when you load the same URL inside IE inside win2k? I wonder how many times it can recursively be loaded without the parent browser freezing.

Re: MSPaint in JavaScript

#83

Earlier quoted context omitted.

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?

He did a few AMAs on Reddit: https://www.reddit.com/r/IAmA/comments/c8ru2y/i_made_a_free_... https://www.reddit.com/r/IAmA/comments/9urjmg/i_made_a_free_... I find this fact mind blowing: Right now, Photopea is about 1.4 MB (most of it is zipped javascript). 880 kB is the actual program 150 kB are localizations to 38 languages, with 650 phrases in every language 116 kB is a database of gradients, brushes, patterns an…

i hope he's getting payed

Re: MSPaint in JavaScript

#84
post #73

Earlier quoted context omitted.

Well, for start, you would need to upload 5GB. Not sure how much time it would take you given that usually normal US consumer has a crap connection when it comes to it. Always amazed how in Earth USA is still 1st economy with all the crap Verizon/Comcast & Co do to average US citizen.

It's JavaScript. It runs on the client side.

lol, so much so, I create games in javascript so I only need a static server.

Re: MSPaint in JavaScript

#85
post #63

Earlier quoted context omitted.

I’m sure there are many ways, but I’ve done it by stitching together dozens of photos to create a panorama.

That makes sense I need to go look up how big photo files are now I guess.. It has been many years since I used photoshop for editing photos (or at all I suppose); my last camera (excluding my phone) was a Nikon D70 (only 6 megapixels).

I was surprised recently when my GF was uploading photos from our camera to our file server and it's like 50MB per file and that the last few months of photos was like 100GB of data to upload.

Re: MSPaint in JavaScript

#86
post #55

Earlier quoted context omitted.

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.

If you don't mind me asking, what's some like meta data you could share on what makes for a 5GB photoshop file? I'm just really curious at how a single photoshop file gets that large. Does it contain a bunch of workflows and auxiliary assets or something?

Here's one you can download: https://www.spacetelescope.org/images/heic1502a/

4.3GB Photoshop (PSB) image of the Andromeda galaxy. It's only one layer, but the resolution is 69536 x 22230.

Re: MSPaint in JavaScript

#88

Photoshop in JavaScript: https://www.photopea.com/ I use it all the time, amazing it was created by a single person!

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.

Re: MSPaint in JavaScript

#89

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 wan…

They even replicated the 10x zoom easter egg (draw something and click the line below 8x zoom).

Re: MSPaint in JavaScript

#90
post #15

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.

You might be interested in Paintbrush [0]. It's a free open source native app that's extremely close to MS Paint in functionality.

[0] - https://paintbrush.sourceforge.io

Post reply on HN