Kamel icon indicating copy to clipboard operation
Kamel copied to clipboard

GIF suppport

Open filwiesner opened this issue 3 years ago • 10 comments

Does Kamel support GIFs (animated image)? I couldn't find any mention of it in README or using repository search.

filwiesner avatar Jan 08 '22 21:01 filwiesner

No it doesn't. The reason is that Kamel focuses more on Desktop than Android. You can see this issue which has a sample about a GIF Composable, however, last time I tested it, the performance was terrible. And that's the reason, Kamel doesn't support loading GIFs yet.

alialbaali avatar Jan 09 '22 02:01 alialbaali

Any updates?

DRSchlaubi avatar May 30 '23 21:05 DRSchlaubi

@DRSchlaubi If you or someone else creates a pr with animated image support I can take a look. I don't have time to look into it atm

luca992 avatar May 31 '23 19:05 luca992

any updates on this?? this could be a game changer! Btw this library is far better than coil imo, had a lot of problems and when i changed to this one for my multiplatform migration, all the problems disappeared!!! Congrats on the library!

PMARZV avatar Dec 21 '23 22:12 PMARZV

I still don't have time at the moment. Prs are welcome

luca992 avatar Dec 22 '23 02:12 luca992

Next release should have support for gifs 👍

https://github.com/Kamel-Media/Kamel/assets/4157455/9dc83dd2-23a5-42b9-aad2-d36cb1f2a68b

luca992 avatar Mar 14 '24 10:03 luca992

released in v1.0.0-beta.5 lmk if there a problems... as I've only tested with a single gif :sweat_smile:

luca992 avatar Mar 14 '24 23:03 luca992

testing it tomorrow

PMARZV avatar Mar 14 '24 23:03 PMARZV

i have tested it and i works perfectly.

I have noticed that when using "media.kamel:kamel-image-default:1.0.0-beta.5" in common main and targeting only (for example) desktop, the build fails because it doesnt find "io.ktor:ktor-client-core:3.0.0-wasm2" (even though im not targeting wasm), it only works after adding "maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")" to dependencyResolutionManagement in settings gradle. I have then tested to add the same Kamel dependency to an android project and same thing.

Btw minSdk = 28 in android, that must be because you require something that its not available in lower versions right? (Error: uses-sdk:minSdkVersion 21 cannot be smaller than version 28 declared in library [media.kamel:kamel-decoder-animated-image-android:1.0.0-beta.5])

Without these issues, everything is working as expected!

PMARZV avatar Mar 15 '24 18:03 PMARZV

@PMARZV Yeah I'm still waiting for a non-experimental ktor build with wasm support. Didn't realize it would require consumers of the library to have to add that repo though. On the stable 0.9.x branch I'm still keeping wasm and non-wasm builds separate so the the non-wasm build can have a stable ktor... But for the beta, I just don't want to deal with it haha. I'm just going to keep it beta until a non-experimental ktor build is out.

And unfortunately, the skia rendering implementation is not available on android... and AndroidAnimatedImage is API level 28.

There's probably a way to make android decoder that supports API level 21 by adding a dependency (or writing something custom)... but I probably would make that a separate android only decoder. If anyone wants to make a pr to figure that out, be my guest.

luca992 avatar Mar 15 '24 20:03 luca992