signalapp / signalapp/Signal-iOS

Animated APNG stickers with palette are not animated

Open
#4,611 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Acknowledged
Dominant language
Swift
Stars
12.2k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

  • I have searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • This isn't a feature request or a discussion topic

Bug description

Some animated APNG stickers are not animated on Signal for iOS. While digging, I realized that the common thread between faulty stickers is that they contain a palette (i.e. PNG with a tRNS chunck).

Having a palette is very important for animated stickers, as it allows to save a lot of weight, thus allowing stickers with higher resolution/more frames to be uploaded.

Note that APNG stickers with palette do work on Signal on all other platforms.

Here are some examples:

Demo sticker with palette

This sticker is not animated on iOS. ❌
https://signal.art/addstickers/#pack_id=b020b5f29795e931cf11c4450d12ebca&pack_key=f2a19052ed4077ffbe59d7374a6a7ed7e433854abb5b5844f0af5eaf3c7f5ade

% pngcheck sticker_with_palette.png 
OK: sticker_with_palette.png (304x304, 8-bit palette+trns, non-interlaced, 24.4%).
% du -h sticker_with_palette.png 
72K	sticker_with_palette.png
Demo sticker without palette (RGB)

This sticker is animated on iOS. ✔️
https://signal.art/addstickers/#pack_id=f30476e7bab76d9b73c289c97bc6fdb4&pack_key=0bb6189c1c7ab04b56a3aa59a69de5101a4a6b0dec54cc3c880732b7be7546d7

% pngcheck sticker_rgb.png
OK: sticker_rgb.png (300x300, 32-bit RGB+alpha, non-interlaced, 67.4%).
% du -h sticker_rgb.png
116K	sticker_rgb.png
Example pack containing both with and without palette stickers

This pack's only sticker that is animated on iOS is the one without a palette:

https://signal.art/addstickers/#pack_id=c8b7a540d40b85697a6f80491f78a04a&pack_key=75aa857b1bd3d7553320da129f4db97a0c10b6f4fceb9264b22d66f4292b318e

% pngcheck *.png
OK: 0.png  (270x300, 8-bit palette+trns, non-interlaced, 91.5%).
OK: 1.png  (320x300, 8-bit palette+trns, non-interlaced, 90.3%).
OK: 2.png  (334x300, 8-bit palette+trns, non-interlaced, 81.7%).
OK: 3.png  (370x300, 8-bit palette+trns, non-interlaced, -13.6%).
OK: 4.png  (270x300, 32-bit RGB+alpha, non-interlaced, 91.7%).
OK: 5.png  (270x300, 8-bit palette+trns, non-interlaced, 82.1%).
OK: 6.png  (270x300, 8-bit palette+trns, non-interlaced, 84.0%).
OK: 7.png  (300x300, 8-bit palette+trns, non-interlaced, 90.7%).
OK: 8.png  (320x300, 8-bit palette+trns, non-interlaced, -6.7%).
OK: 9.png  (270x300, 8-bit palette+trns, non-interlaced, 91.3%).
OK: 10.png (270x300, 8-bit palette+trns, non-interlaced, 89.9%).
OK: 11.png (280x300, 8-bit palette+trns, non-interlaced, 63.4%).
OK: 12.png (270x300, 8-bit palette+trns, non-interlaced, 76.4%).
OK: 13.png (280x300, 8-bit palette+trns, non-interlaced, 59.6%).
OK: 14.png (270x300, 8-bit palette+trns, non-interlaced, 71.4%).
OK: 15.png (270x300, 8-bit palette+trns, non-interlaced, 89.3%).
OK: 16.png (300x300, 8-bit palette+trns, non-interlaced, 68.3%).
OK: 17.png (270x300, 8-bit palette+trns, non-interlaced, 73.5%).
OK: 18.png (280x300, 8-bit palette+trns, non-interlaced, 59.7%).
OK: 19.png (290x300, 8-bit palette+trns, non-interlaced, 68.0%).
OK: 20.png (270x300, 8-bit palette+trns, non-interlaced, 42.6%).
OK: 21.png (300x300, 8-bit palette+trns, non-interlaced, 69.8%).
OK: 22.png (270x300, 8-bit palette+trns, non-interlaced, 50.6%).
OK: 23.png (270x300, 8-bit palette+trns, non-interlaced, 86.7%).

No errors were detected in 24 of the 24 files tested.
Steps to reproduce
  • Download a pack containing stickers with a palette on a iOS device (see example above)

Actual result: animated stickers are not animated

Expected result: animated stickers are animated

Device info

Device: iPhone 11 Pro

iOS version: 14.1

Signal version: 3.21.0.1

Note that I don't own an iOS device, so I can't provide debug log or further information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reproducing the issue on iOS 14.1 with the linked palette and RGB sticker packs, then compare their animation behavior. Done means APNG stickers containing a palette and tRNS chunk animate on iOS as the RGB examples do.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.