Open marcussacana opened 3 years ago
It could really bloat up the size of the plugin to do something like that, and gifs wouldn't be supported It is possible, but people usually would want to do this with animated emojis I assume
Hmm, Well, that's true, but I think that should help a lot in the flood problem Also, maybe you can just like what you do now, keep 2 versions of the plugin. To the one with composition, to allow use gifs, just disable this feature to animated emojis
Another possibility, Only compose the image when select multiple static emojis. To the animated ones we can't do much with this library, then maybe just put links in that case, or just find alternative libraries (that i'm sure we're able to found at least one). Bloat the plugin size isn't a problem at all, isn't like the discord, a chromium app is optimized pfff. also, just like you do currently you can release as a 'special versoin' to who wants, and still release the minimal version of the plugin.
Working with images on the canvas isn't that bad for static images IMO. For gifs, it should be possible (anything is ;)), but to do it all in JS, performantly, would be a huge pain sans other libs (and probably even with other libs). Every example I've seen requires an LFZ decompressor, other stuff, etc
Another thing that would be hard about GIFs would be stringing them together in a way that they all appear coherently. If gif A has 41 frames forming one perfect loop, and gif B has 55 frames forming a perfect loop, and gif C has 13 frames forming a perfect loop, you'll need 29,315 frames to loop it all perfectly. And of course there's heuristics you could take to try and cut the gif at less destructive points, but it would be complicated and janky to do this the "right" way, no matter how you define "right".
I was able to put this together: https://jsfiddle.net/m28djz1c/. Obvisouly extremely jank (images aren't sorted, aren't split up etc), but it works. We could use Uploader.upload
to upload the file.
Good job @Mattwmaster58
What about use library like this: https://github.com/lukechilds/merge-images To automatically generate a new image when we select multiple emojis... Puting all emojis side-by-side in a single image After that we just need send the genareted image as attachment...
Anyway thank you for the plugin, I really wanted something like that.