FredHappyface / Android.EweSticker

EweSticker is an Android sticker keyboard application, specifically designed for sharing a wide variety of custom stickers in supported messaging apps. This project draws inspiration from the uSticker project and is a fork of the woosticker repository.
MIT License
79 stars 8 forks source link

Feature: implement max sticker size #42

Closed FredHappyface closed 1 year ago

FredHappyface commented 2 years ago

Feature

Is your feature request related to a problem? Please describe

Improving application stability (+ sticker copy speed)

Describe the solution you'd like

It's probably a good idea to exclude massive images as these would not constitute a sticker. This issue is to consider the max image size in bytes for a future version

For instance the largest photo taken on my camera is approximately 7MB - and certainly would make a terrible sticker

For existing applications the limits are as follows

app id max size (KB) source
WhatsApp com.whatsapp 100 https://faq.whatsapp.com/general/how-to-create-stickers-for-whatsapp/?lang=en
Telegram org.telegram.messenger 512 https://core.telegram.org/import-stickers
Signal org.thoughtcrime.securesms 300 https://support.signal.org/hc/en-us/articles/360031836512-Stickers

Maximum sized gif in some tstickers (https://github.com/FHPythonUtils/TStickers) output was <2MB and the largest webp was approximately 1.6MB so going to propose 2MB (Already far larger than existing applications use by about 4x)

Also, if the user had 4096 stickers at this size (the current limit), then they could have 8GB in stickers

Describe alternatives you've considered

Could do nothing but this could cause ewesticker to consume too many resources and affect the application stability (e.g. when loading 128 massive image files into the keyboard)

Other options involve trying to get the sticker dimensions but I suspect this is going to be difficult with DocumentFile

Or sum the sticker sizes and abort at some max size e.g. 2GB (so a user can still use a handful of massive files if desired) perhaps even combining these ideas

Additional context

This is an issue rather than a discussion as I plan on working on this in the next development cycle (1-2 months) . Comments are welcome

mpfaff commented 1 year ago

If you implement a limit, use whatever default you want, but make it configurable in the app.

FredHappyface commented 1 year ago

Tbh this is unlikely to make it in anytime soon but I'll definitely take that into consideration, thanks 😊

FredHappyface commented 1 year ago

I think this would be for it's own sake and I'm not convinced this would have much bearing on application stability etc. So closing