Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is there an implicit 1MiB limit for uncompressed animated stickers? #6254

Closed
bodqhrohro opened this issue Jul 9, 2019 · 3 comments
Labels

Comments

@bodqhrohro
Copy link

I handicrafted an animated sticker with a lot of rectangles. Due to it's homogeneous structure, it is compressed quite well, giving 25.3 KiB (which meets the specified 64KB limit), but uncompressed JSON has 1.5 MB size.

While lottie-web displays the JSON correctly, telegram-desktop has some issues. There is no preview:
2019-07-09-161315_1366x768_scrot
and when I add such a sticker to a pack, it's displayed either transparent or as a blurred static image:
2019-07-09-161608_1366x768_scrot

By experimenting with the number of layers and rectangles, I finally noticed that this starts happening when the size of uncompressed data exceeds 1 MiB. Is this an undocumented limitation or a bug?

@bodqhrohro bodqhrohro changed the title [Question] Is there an implicit 1MB limit for uncompressed animated stickers? [Question] Is there an implicit 1MiB limit for uncompressed animated stickers? Jul 9, 2019
@john-preston
Copy link
Member

@bodqhrohro Yes, there is an inner limit for 1 MB. After some real stickers (not gzip-bombs) having slightly more than 1.1 MB I decided to increase the limit to 2 MB (this one will be in iOS app as well).

We need to place some limit. I think 2 MB is more than enough for any real world thing.

@bodqhrohro
Copy link
Author

OK, thanks. Now it turns out that the size of repetitive data actually matters. There is, for example, an issue with transformations shapes, which makes it needed to redundantly specify transformation properties (a/p/s/r/o), even though there are default values for them in the JSON schema. But it should be adressed to Bodymovin team, as it crashes not only Telegram, but upstream Lottie parsers as well.

@github-actions
Copy link

github-actions bot commented Mar 6, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants