News for hackers. Stuff that matters.
Re:A Horrible Experiment by t0astbread on Sunday September 20, 2020 @10:21AM (#24534209)
Why does Twitter even try so hard to make preview crops "meaningful"? Sure, it produces interesting results sometimes (sometimes funny, sometimes less so) but isn't it a lot of work for not a lot of benefit?
Re:A Horrible Experiment by matthewmacleod on Sunday September 20, 2020 @10:46AM (#24534355)
Cropping well is quite a hard problem!

I know it seems on the surface like “just resize it” is a good approach, but it’s not super uncommon to see quite extreme aspect images, and even for normal use there are lots of different constraints in different systems that mean a really simple system can produce undesirable results.

I used to get this all the time back when I built custom content management systems. Users would upload images which were automatically cropped into various sizes for use in particular bits of content; really long or wide images would look awful when scaled, and automatic fixed-size crops would often end up cutting out the actual interesting bit of the image. That’s what various “automatically generate interesting thumbnails” algorithms try to avoid.

In the end for me the best tool was auto-crop-with-preview-and-manual-override, and I’m beyond infuriated every time I try to upload an image to Twitter and it doesn’t allow this obvious and simple way to avoid the issue.

Re:A Horrible Experiment by Lammy on Sunday September 20, 2020 @10:41AM (#24534321)
I used to get annoyed by this too but came around to accepting it after building a Web (Jekyll) photo processing pipeline of my own. Art direction is very difficult to do well when you have to be able to handle any user-uploaded photo that might be in any aspect ratio. Desktops favor displaying wide photos, and handsets favor displaying tall ones. Cropping everything down to a square lets you handle any combination of photo and display aspect ratios with minimal Badness.

I’ve never seen the Twitter-dot-com codebase but would be willing to bet it’s probably using VIPS’ smartcrop feature (:crop => :attention) https://www.rubydoc.info/gems/ruby-vips/Vips/Interesting

Re:A Horrible Experiment by noxer on Sunday September 20, 2020 @10:24AM (#24534230)
Agree, resize would in most cases be way more useful.