Releases: Kamel-Media/Kamel
Releases · Kamel-Media/Kamel
v1.0.10_avif (SNAPSHOT)
- Experimental AVIF support (JVM, Android, iOS)
- Including Android API <31
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v1.0.0 Release!
- kotlin
2.0.21 - compose
1.6.11 - ktor:
3.0.0
v0.x -> v1.x notes:
New
- #85 WasmJs support!
- #96 With
media.kamel:kamel-imageis now bare bones and lets you pick and choose all mappers, fetchers, and decoders to import into your project that are not included inkamel-core. - #96
media.kamel:kamel-image-defaultIncludes all includes all packages besideskamel-decoder-svg-batik - Adds a
FileUrlFetcherto support loading non-resource local files Stringmapper will now handlefile:///uris:asyncPainterResource("file:///$absolutePath")- Adds gif support! #12 with #100 by @luca992
- Prevent out of memory exceptions for xl images with experimental Image resizing image bitmap decoder (Android only right now) #105 by @luca992
- To try out add
implementation("media.kamel:kamel-decoder-image-bitmap-resizing:1.0.0-beta.6")and addimageBitmapResizingDecoder()to yourKamelConfig
- To try out add
Breaking changes
- Change
media.kamel:kamel-image->media.kamel:kamel-image-defaultfor the same behavior as pre 1.0.0 releases. - Old Depreciated methods removed
Depreciated
- Old KamelImage & KamelImageBox should be replaced with new KamelImage & KamelImageBox api with a
BoxWithConstraintsScopescoped resource in that can support image resizing
Setup
Default Setup
Add the dependency to the common source-set or to any platform source-set:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("media.kamel:kamel-image-default:1.0.0")
// no need to specify ktor engines, one is included for each target
// ...
}
}
}
}Granular Setup
For a more granular setup, you can choose which modules to include in your project:
kotlin {
sourceSets {
commonMain {
dependencies {
// core module (required)
implementation("media.kamel:kamel-image:1.0.0")
// Note: When using `kamel-image` a ktor engine is not included.
// To fetch remote images you also must ensure you add your own
// ktor engine for each target.
// optional modules (choose what you need and add them to your kamel config)
implementation("media.kamel:kamel-decoder-image-bitmap:1.0.0")
implementation("media.kamel:kamel-decoder-image-bitmap-resizing:1.0.0") // android only right now
implementation("media.kamel:kamel-decoder-image-vector:1.0.0")
implementation("media.kamel:kamel-decoder-svg-batik:1.0.0")
implementation("media.kamel:kamel-decoder-svg-std:1.0.0")
implementation("media.kamel:kamel-decoder-animated-image:1.0.0")
implementation("media.kamel:kamel-fetcher-resources-jvm:1.0.0")
implementation("media.kamel:kamel-fetcher-resources-android:1.0.0")
// ...
}
}
jvmMain {
dependencies {
// optional modules (choose what you need and add them to your kamel config)
implementation("media.kamel:kamel-fetcher-resources-jvm:1.0.0")
// ...
}
}
androidMain {
dependencies {
// optional modules (choose what you need and add them to your kamel config)
implementation("media.kamel:kamel-fetcher-resources-android:1.0.0")
// ...
}
}
}
}Granular Setup: Ktor HttpClient Engine
When using kamel-image ktor engines are not included per target.
In order to fetch remote images you also must ensure you add your own ktor engine for each target.
You can find the available engines here.