qdsfdhvh / compose-imageloader

Compose Image library for Kotlin Multiplatform.
https://qdsfdhvh.github.io/compose-imageloader/
MIT License
442 stars 15 forks source link

Small size of svg images #180

Closed klusi closed 1 year ago

klusi commented 1 year ago

After update to 1.5.1 (from 1.3.1), there is broken size of some downloaded SVG images. I would like the image to fill the entire image view. Here's en example of two similar SVG images and comparison with Coil-Compose: imageloader As you can see, one of the images has broken size and setting contentScale or other imageLoader options has no effect to it. Here's my code:

    Image(
        painter = rememberAsyncImagePainter(
            url = url,
            contentScale = ContentScale.FillWidth,
        ),
        contentDescription = null,
        modifier = Modifier
            .size(50.dp)
            .background(color = Color.Red),
        contentScale = ContentScale.FillWidth,
    )

I have attached a demo project - ImageDemo.zip

Versions: ImageLoader - 1.5.1 Kotlin - 1.8.20 Compose - 1.4.0 Gradle - 8.0.2

klusi commented 1 year ago

@qdsfdhvh Thanks for fix. When you upload new release (1.5.2) to maven please?

qdsfdhvh commented 1 year ago

Sorry, the configuration was changed incorrectly and the uploaded version code is missing, I am re-uploading it now.