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

We did a similar thing a while back when we had a similar layout on an early news site. Then I used math to make our code smarter instead.

Rather than having lots of weird image sizes dictate my layout, I decided to have my weird layout dictate my image sizes. The result was this:

https://www.mashape.com/stremor/automatic-image-crop-and-res...

Yes. This really does crop images for any aspect ratio. Automatically. Yes, if you try and make a picture that is just your face be 1080 tall and 90 wide it will likely choose just your nose. What do you want it to do in that scenario? this is meant for taking 4:3 and making them square, or 16:9 and making them 9:16, not for taking 16:9 and making it 1:4. But it will try its darnedest.



You could actually specify options for the images when they are cropped, like "crop-center" or smth -- that would allow to center a photo around the eyes, and a landscape around the horizon line center.

Now, add a face (and landscape) recognition to this, properly optimize, and get a (deserved) as-smart-and-powerful-as-google feeling down your spine :)


You didn't play with it. It does object detection. It is as "smart and powerful as google". That's kind of our thing. We are smarter than Google, and working on the more powerful thing.

If you give it a pic with you off in the corner it will crop around you. If you give it a pic with a laptop sitting on the right third it will crop around that. It is pretty smart.


You could speak of that from the start :)




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

Search: