The “acceptable” test showed that users found gifsicle better at producing acceptable results (87% vs. The results were everything I could have hoped for. The goal was simply to prove that we weren’t doing worse than our old converter, not necessarily that we were doing better. This study was opened up to all Tumblr employees, as well as some “randomly selected” outsiders (my friends and family). Participants were presented with one of two questions:ġ.) Given an original and 1 resize, decide whether it is ok, unacceptable, or completely broken.Ģ.) Given an original and 2 resizes (randomly choses which was left and which was right, sometimes they were identical), choose the better image or say there is no difference. Sometimes it is slight, sometimes it is significant, but there is no way we could put out a converter that messes up your images, even if it messes them up quickly. How do you resample? Do you sharpen? Where in the workflow is gamma correction applied, if at all? The list goes on and on.Īs you can imagine from the performance differences, our previous converter and gifsicle take very different approaches to GIF resizing. This increased our size rejection rate to 0.68% while still keeping us well under our CPU budget. The specifics are in this post, but the short version is that Eddie was able to improve quality by adding some more advanced resampling methods as well as palette expansion for small-palette images. We played around with the code a bit, but eventually we just got in touch with the author, Dr. ![]() The size rejection rate was a much lower 0.59%.Īs compelling as the performance of gifsicle is, the quality problems are too much to ignore. Also, just under 99% of all images were smaller when resized than they were at their original resolution. Using gifsicle is so much faster that our CPU rejection rate drops to 0.00 on my test set. The converter was making over 25% of all resizes larger than the higher-resolution originals! The total rejection rate for my sample set was 4.46% of all original GIFs uploaded. Even if we bump up to 2MB, the rejection rate is 2.75%. A whopping 17.1% of all GIFs were over 1MB. This is an underestimation of how many GIFs would be rejected for time because this is only one of several resizes required. All resizes must be under 1MB or we will convert the first frame to JPEG and call it a day.Ģ.6% of my 90K GIFs took longer than 20 seconds to resize. Each resize is given up to 20 seconds to complete in our application, but all resizes must complete in 30 seconds. These were tested against the current converter, resizing down to the next size we produce. To get an unbiased test set, I took a random sample of roughly 90K GIFs that Tumblr users tried to upload, not limiting the corpus only to those that succeeded. If you haven’t figured it out yet, the mystery converter is gifsicle. Those were more fully explored in here a couple of days later. The mystery converter was roughly 1000x faster on the “slapping” GIF and happened to look great, but had quality problems on other images. Some of you may have seen this post where the performance of our current converter was compared with a new “mystery” converter. I don’t want to get kicked by a monkey, so we started working hard late last year to fix it. Some have gone so far as to threaten monkey kicks. ![]() The unpredictability of these failures made our GIF limits feel arbitrary and terrible to the end users. Some images would balloon in size (600KB at 400x400, 27MB at 250x250). This was not directly attributable to color, dimensions, or frame count, but a mysterious mix of all of them. We had two core failure modes in our prior resizer: Some images would take as much as several minutes to convert. ![]() Every image that comes in is scaled to a number of smaller sizes and the smaller your image is, the fewer resizes need to happen, which means less time. There is a lot of misinformation about GIF limits on Tumblr, so let me set the record straight: We don’t count colors or frames or pixels. I’ve got ninety-nine problems and the GIF is one All this because our resizer couldn’t handle the original. If you click-through to the original post, you will see a muddy, reduced-saturation mess. It also would have failed if he’d tried last Sunday. The image above is an original from sukme that could not be posted to Tumblr last June. Perhaps even more surprising is that the tools used to handle GIFs at Tumblr hadn’t changed much from those early days. Believe it or not, support for GIFs at Tumblr was a happy accident! When Tumblr put together the code for handling JPEGs, support and GIFs (and PNGs) happened to also work using the same code.
0 Comments
Leave a Reply. |