logoalt Hacker News

DonnyVyesterday at 1:24 PM2 repliesview on HN

I can't believe this doesn't mention Image Seam Carving. Surprise this was never built into browsers.

https://trekhleb.dev/js-image-carver/


Replies

halaproyesterday at 4:17 PM

I think this is far too risky.

This doesn't help you if you want to save bandwidth, it worsens it.

It doesn't help you if you custom-crop images depending on the viewport size, because if you go that far to art direct, then you're not going to like the result of automated and unsupervised seam carving.

Just publish 3 sizes, maybe crop the smallest one if the focus area is too small. Done.

xnxyesterday at 3:24 PM

I'd seen the technique, but never visualized like that. Very cool.