Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi, I am the creator of https://www.Photopea.com and I am a bit sad, that you did not start to work on it earlier. Wish you good luck! :)


Thanks Ivan, still lots of fun to move pixels around :)


You are welcome :) BTW. you can open Pixlr PXD files in Photopea (including text layers, layer styles, save them as PSD, etc)

Actually, it is the 19th most frequent format of files opened in Photopea :) https://twitter.com/photopeacom/status/1172183966125871105


I am continually impressed with how amazing photopea is. Probably one of the most impressive web apps ever.


Wow. I just used it for 2 minutes. Its like photoshop a few versions ago, on my phone browswer. How???


Absolutely my feelings!

Jaw dropped when i realised the "screenshot" of the editor is actually the editor. On my phone!

Of course I've used Pixlr and i love it bur will definitely try PeaApp more


Photopea has been my quick-n-dirty photoshop app of late... though pixlr has some nice features e.g. liquify.

Ivan and Ola deserve a huge thank you for releasing these tools!


Thanks! BTW. there is Liquify in Photopea, too.https://www.facebook.com/photopea/photos/a.1703140446613703/...


Is all of Photopea static besides things have to do with the account management? How do you go about hosting the site? I'm always curious to hear about these things from people who obviously know what they're doing.


Yes, Photopea is only one HTML, one CSS and many JS files. It is about 1.5 MB in total. I pay 40 USD a year for the hosting + 12 USD a year for the .com domain.

I gave a talk about it: https://www.youtube.com/watch?v=IZmaeC_Ma5A


Wow.

Have you tried moving particularly hot portions of code to WebAssembly yet?

Obviously in Photopea's case this would generally require rewriting portions of the code in C/C++/Rust, and potentially doing a few iterations of looking at the generated WASM and tweaking the input to produce the best (maintainable) results... so a bit of a long-term project :)

Whenever you get to this, I'm sure a lot of people would appreciate a benchmark post with speedup percentages etc.

And WASM is so new that maybe sharing some of the approaches you used, the JS you started with, and the C/C++/Rust/etc you ended up with, might also attract folks looking for assistance with their own image-processing-related projects. (This being said... translation: I, like lots of others, am extremely interested in the bits of code that make Photopea so efficient, which you worked hard to perfect and have every right to not share :D)


Hi, thanks! I think the JS that I write is quite efficient and I don't expect the WASM version of the same features to be faster. But I do plan to write something in WASM and see for myself (you don't have to write in C, you can write WAST and convert it to WASM :D).

I open-sourced many parts of Photopea: https://github.com/photopea?tab=repositories .


Photopea is awesome. Thank you for building it.


Are you using WASM like Figma, or is this pure javascript?


I do everything with Javascript. I never liked using native tools / compilers for programming (there are too many of them with too complex configurations). I use only a text editor and a browser for development :)

WASM builds of two C libraries are used in Photopea: Harfbuzz (177 kB) and Fribidi (32 kB). But their authors were kind enough to give me WASM files directly, so I did not have to compile anything.


Just noticed this comment after asking about WebAssembly elsewhere.

Wow, that's amazing.

I did some headscratching with WebAssembly a little while back while figuring out what approach to take for a small thing I wanted to make reasonably cross-platform. My terribly nonscientific back-of-the-envelope benchmark was to time reading/writing an array. Initially JavaScript won squarely over WASM, but then I realized I wasn't using -O3 (woops) and the WebAssembly got about 1.75x faster than it appeared my JS code ever would.

In my very limited experience the most significant difference at the end of the day seems to be that the source language isn't JavaScript. All tooling seems to have grown some element of "????" sadly, and all languages bring their own warts. Once I figured out a working [webassembly generation] workflow, it felt pretty solid, like it wasn't about to fall over too easily. Clang support seems to be just about perfect at this point, if you haven't tried it within the past few months.

My personal first medium/long-term step will be to get a good grip on reading WebAssembly S-expressions, so I can help keep the loop as closed as possible in terms of understanding what my source is generating. (And maybe follow the occasional reverse engineering white rabbit.)

Next will be conquering my love of interpreted languages that don't have a compile step (let alone a long one ;) ), haha. JavaScript indeed can't be beat for rapid iteration! (Particularly if you use live-reload in testing...)


Cool! What GUI toolkit do you use?


I did not use any UI libraries, I wrote my own CSS and JS.


Would be great to factor it out as a reusable lib.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: