skydoves / landscapist

🌻 A pluggable, highly optimized Jetpack Compose and Kotlin Multiplatform image loading library that fetches and displays network images with Glide, Coil, and Fresco.
https://skydoves.github.io/landscapist/
Apache License 2.0
2.01k stars 112 forks source link

FrescoWebImage is cropped, no matter what ContentScale type is used #502

Closed MiniEmerald closed 1 month ago

MiniEmerald commented 1 month ago

Hi, I encountered an issue with the library.

Please complete the following information:

Describe the Bug:

Content of a FrescoWebImage is cropped, no matter what ContentScale type is passed to the FrescoWebImage

Happens for both still and animated images

Expected Behavior:

FrescoWebImage image scaling behaves according to the ContentScale used

Example with screenshot

val url = "https://download.blender.org/branding/blender_logo_socket.png"

FrescoWebImage(
    controllerBuilder = {
        Fresco.newDraweeControllerBuilder().setUri(url)
    },
    contentScale = ContentScale.Fit,
    modifier = Modifier.fillMaxWidth()
)

Screenshot_20240619_231151

skydoves commented 1 month ago

Hey @MiniEmerald, thank you for reporting this issue. It has been fixed on the new release, 2.3.5.