项目介绍

tinify/iMessage-Panda-sticker 是一个托管在 GitHub 上的开源项目,目前获得 86 个 Star、8 次 Fork。

仓库全名
tinify/iMessage-Panda-sticker
Star 数
86
Fork 数
8
未关闭 Issue
1

README 摘要

Keeping animated PNG iMessage stickers under 500KB With the release of iOS 10, Apple introduced stickers in iMessage. A sticker is a small image or animation that can be sent or placed on messages, photos or on other stickers. Creating a sticker pack with your own animated stickers is simple! You need an animated PNG and Xcode 8. Clone this project to get started, watch Apple's video tutorial, or follow the steps…

完整内容见 GitHub 原始 README 或本页 。

常见问题

如何获取 iMessage-Panda-sticker 的源码?

可以直接克隆仓库:git clone https://github.com/tinify/iMessage-Panda-sticker.git,默认分支为 master;安装与运行步骤见仓库 README。

iMessage-Panda-sticker 最近还在维护吗?

仓库最近一次更新为 2018年7月31日,当前有 1 个未关闭 Issue;Star 数为 86,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Animated PNG example iMessage sticker for iOS 10, with waving panda!

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
112
价值分
54
活跃状态
活跃

README

Keeping animated PNG iMessage stickers under 500KB

With the release of iOS 10, Apple introduced stickers in iMessage. A sticker is a small image or animation that can be sent or placed on messages, photos or on other stickers.

iMessage panda sticker

Creating a sticker pack with your own animated stickers is simple! You need an animated PNG and Xcode 8. Clone this project to get started, watch Apple’s video tutorial, or follow the steps below.

Keeping animated stickers below the maximum size of 500KB can be challenging. We’ll show you how you can use TinyPNG to accomplish this! Read on!

Creating an iMessage Sticker Pack Application

First create a new Sticker Pack Application in Xcode 8. Select File > New > Project from the menu, then choose Sticker Pack Application.

Create new project, step 1

Name your project and choose a location to save it.

Create new project, step 2

Adding an animated PNG to your Sticker Pack

Your project is empty after creation. If you already have an animated PNG (APNG), you can drag and drop it to the sticker pack under Stickers.xcstickers > Sticker Pack.

Empty project

Drag and drop sticker

For optimal performance, Apple has added a hard file size limit of 500KB for stickers. Xcode will warn you when you attempt to add a file that is larger.

Error when over 500KB

Making sure your stickers are below 500KB can be especially challenging for animated stickers! Luckily you can use TinyPNG to compress your stickers.

Compressing animated PNGs

You can compress your images in order to reduce the file size. With the TinyPNG website you can compress APNG files for free. This allows you squeeze every last byte out of your images and to create the best possible stickers!

APNG is now under 500KB

Compare before & after

The compression uses advanced techniques to compress images. The difference is hardly noticeable but the filesize savings after compression are quite spectacular. The APNG image of the waving panda is compressed from 1.5 MB to 492 KB. You can see there is barely a visible difference.

Note that animated PNGs are only displayed in Firefox or Safari. In Google Chrome, Opera, Microsoft Edge and other browsers you only see the first frame.

Original APNG – 1.5MB Optimised APNG – 492KB
Original Compressed

How to reduce file size further?

If TinyPNG is not able to compress your animated PNG below 500KB, you might have to take other steps to reduce the file size. You may have to change your image so that the dimensions are smaller, or use fewer frames.

评论

暂无评论