top | item 25712301

Show HN: JPEG.rocks – Privacy-aware JPEG optimizer built with WebAssembly

61 points| neslinesli93 | 5 years ago |jpeg.rocks | reply

25 comments

order
[+] fireattack|5 years ago|reply
IMHO these JPEG optimizers need to explain what optimization they actually do.

At the very least, it should mention if the optimization is lossless (by dropping metadata, optimizing Huffman table/progressive scan parameters etc.) or lossy: because they have very different use cases (sometimes you need the image to be pixel-wise identical).

Even better, if lossy, "how lossy" it is.

I'm aware it's using mozjpeg [1] which is pretty good (guetzli [2] is another good one for the interested); still, it comes with many settings and routines (both lossless and lossy) that can be configured.

[1] https://github.com/mozilla/mozjpeg

[2] https://github.com/google/guetzli

[+] neslinesli93|5 years ago|reply
That's a very good point, thank you.

I could add some explanation on github and offer two kinds of optimization (lossless and lossy) and add a quality slider for the lossy one

[+] usr1106|5 years ago|reply
> At the very least, it should mention if the optimization is lossless [...] or lossy

True, the UI is optimized a bit too much :)

By looking very carefully at some test image I see that it is not lossless, there are more compression artifacts. Well, lossless would have been a miracle, it reduced the size of my photo from nearly 600 KB to just a bit over 180 KB.

[+] treszkai|5 years ago|reply
Absolutely. Until now I had no idea what a JPEG optimizer is, and even the About page of jpeg.rocks said exactly nothing about what it does.
[+] edualm|5 years ago|reply
Ahhhh the times we live in, when it specifically needs to be said that something like a image optimizer is privacy-aware. :(

Anyway - looks nice and something I'll use from time to time, thanks!

[+] usrusr|5 years ago|reply
It's a very unique property. Not among image optimizers, but among tools that can be accessed with any web browser simply by typing a domain name in the address bar. Most of those tools are merely frontends for a server doing the work and as such something that wouldn't even be allowed in many lines of work.

I see what irks you, calling it "privacy-aware" and not something more technical like "installation-free client side", but it can be a pretty cool approach to many rarely-encountered problems.

I'm not much into "JPEG optimization" (whatever that is, I just bite the bullet and wait those ten seconds GIMP takes for startup on my otherwise comically fast Ryzen 9 Windows box whenever I feel like tweaking JPEG compression), but https://hexed.it/ has been a friend for many years: i rarely need a hex editor, but even if I happen to run into a "guess it's time for a hex editor!"-situation twice on the same OS installation (unlikely), the last time would be so long ago that I would have forgotten what I installed. hexed.it is a godsend. Jpeg optimziation is perhaps not quite the same level of problem/solution fit, but it doesn't have to be.

[+] rouxz|5 years ago|reply
Not just that, it is a "webapp". When did ImageMagick became old?
[+] bertman|5 years ago|reply
This looks nice, bookmarked! Maybe expose some simple quality setting to the user? As far as I can tell after glancing at the code, the only optimization that's done is re-encoding the image with quality set to 75, so a quality slider would be nice imho.
[+] neslinesli93|5 years ago|reply
Thank you :)

My initial plan was to replicate the functionality of tools like tinyjpg, thus just offering users a simple interface with good defaults. But I already had in mind the lossy/lossless re-encoding functionality, as well as the quality slider, which I plan to add sometimes in the future

[+] bsenftner|5 years ago|reply
Okay, privacy is achieved by never leaving one's browser. But how secure is that? One's browser is the home of an unknown number of trackers, as well as heavy interest and efforts in breaching tab boundaries. The browser has turned into something we need to completely start over, without Google or any of the FAANG crowds' participation.
[+] usrusr|5 years ago|reply
How many far more interesting (for an attacker, any attacker!) things we do in a browser are subject to those exact same attack surfaces? That's a bit like saying that a school library has weak security because the checkout desk wouldn't stand a chance against a focused attack of the Red Army.
[+] p5v|5 years ago|reply
This looks promising. I would be interested to learn more about the experience you have had while building this service.

Yesterday, I released https://goart.netlify.app It's an experiment at using WASM-compiled Go code to create complex generative art drawings in the browser. Sounds cool, but I have had quite a few unexpected issues while building it. Especially, the part about having to use Web Workers to do the communication to and from the WASM instance.