Live data from Hacker News

Show HN: Make Your Photo 16x9

einaregilsson.com

11–20 of 45 posts

Re: Show HN: Make Your Photo 16x9

#12

Maybe you can double its usefulness by adding an option to save as WebP, so that's both a ratio and a format converter. I think should be trivial, on current supported browsers at least.

Does the Canvas api have support for webp?

By quickly looking at MDN[0], at least in Chrome, yes. Honestly, I can't say for other browsers at the moment.

[0]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE...

Re: Show HN: Make Your Photo 16x9

#13
Here is how you can do it with ImageMagick:

`convert -gravity center -background black -compose Copy -resize 800x450 -extent 800x450 input.png output.png`

Sadly I don't know how to do it without specifying the size in pixels. Using `16:9` for resize and extent doesn't do the trick.

Re: Show HN: Make Your Photo 16x9

#15
post #5

I'm somewhat surprised twitter hasn't gone ahead and implemented something like this themselves. Kudos for building a solution!

Letterboxing has been deemed Ugly by modern web designers. Better to discard useful content until it looks nice.

Re: Show HN: Make Your Photo 16x9

#16
I built four tools that looked and functioned almost exactly like this about six years ago, but using PHP.

They were called "Picture Perfect," "Portrait Perfect," "Partner Perfect," and "Process Perfect."

I initially developed Picture Perfect for my reporter colleagues at a news radio station to use for our website, and they loved it.

Just drag a photo on the site, crop it exactly how you want to our website's exact aspect, and hit download to save it to a work machine.

My homophobic boss didn't like that I had this on my own server and didn't get approval to share it first, so he ended up sending the link to SoCast (a CMS company) and they built the functionality into the backend a week later. Whatever- it made our lives easier.

Then I moved on and worked at a small local news blog site, and repurposed these tools to use there. We had a quota of articles to write, post, and schedule on social media per shift, and these got 45 minutes of manual photo editing down to five minutes per shift.

These were the tools:

Picture Perfect: Drag and drop a photo, then draw a crop box on it and output exactly the dimension you need.

Portrait Perfect: Drag and drop a portrait photo, and output a version of it centred on a blown-up, blurry version of itself.

Partner Perfect: Drag and drop two photos, draw a crop box on each, and output a single image of them sitting side by side (useful for two portraits of sports stars, or when there were two mugshots).

Process Perfect: Drag and drop a photo and either output a black and white version or a version with a colour multiply effect applied.

When I left that job, I pulled them offline, but recently started work on a site that merged all four of them (behind a login, where you can create any aspect and save your creations). It's buggy and slow, but I haven't had the time to finish polishing it: https://phototools.prezince.com/

But either way, it definitely provided value, and I'm glad someone has done it using only front end code. Good work!

Post reply on HN