You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
and when I add such a sticker to a pack, it's displayed either transparent or as a blurred static image:
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?
The text was updated successfully, but these errors were encountered:
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
@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.
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.
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:
and when I add such a sticker to a pack, it's displayed either transparent or as a blurred static image:
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?
The text was updated successfully, but these errors were encountered: