TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: gifyourself.in - A site for putting your face on GIFs

9 点作者 fjania超过 11 年前

3 条评论

fjania超过 11 年前
Some technical points of interest, perhaps.<p>The gif explosion &#x2F; creation is done server-side using python Wand, Pillow and the excellent images2gif script. Exploding the gif into frames was a giant pain in the ass until I checked out StackOverflow, and the source for Wand, and found the coalesce function a bit hidden. (There are <i>many</i> ways to recreate a gif from it’s exploded frames - coalesce handles all the permutations as far as I can tell.)<p>For the creation tool specifically I tried out several of the Javascript only gif creation libraries and wasn’t crazy about the colors they produced, and was concerned about browser support, which in the end ended up being gated by lack of support for either the Blob object, or webcam&#x2F;getUserMedia on all but Chrome and Firefox.<p>I haven’t given up on using the JS libraries entirely, but I wanted to get this out there first and see what people thought. The requests to create a gif a put on a celery queue and handled by worker nodes to keep the web app from hanging on creation requests.<p>The live preview in the creation tool fakes a gif by drawing each frame to a canvas, compositing the cropped&#x2F;erased image to it, and just using a JS timer set to the gif’s frame delay to flip-book through them.<p>All the gifs have been masked over with details of where, on each frame, the face should be placed, how big it should be, and how much it should be rotated.<p>That’s a part of the site that you don’t see which makes that not-so-magic happen - the masking tool. This is a tool that uses the same cropping interface as the creation tool to generate the set of coords&#x2F;size&#x2F;rotation for the face on each frame. There’s some usability stuff there to help make masking a (relatively) quick process too. The masking tool uses the same live preview technique to see how the mask is coming along. Right now only myself and some of the other people I work with have access to the masker, but we’re considering how to give more people access. After masking a couple hundred gifs, we’ve realized there is a craft to it, and that takes a little learning. In the meantime we’re taking suggestions for new gifs to mask on twitter @gifyourselfin.<p>We’ll also support multiple masks soon, so you could have a mask for anyone in the scene if there is more than one person to put your face over.
abhayv超过 11 年前
ImageMagick has some good tools for manipulating GIFs. We have an iPhone app called Blippy which uses ImageMagick on the server side
评论 #6735373 未加载
baratunde超过 11 年前
w00t