This message was deleted.
# compose
s
This message was deleted.
c
Copy code
@Preview(showBackground = true)
@Composable
fun ImagePresentationTestPreview() {
    ImagePresentationTest()
}

@Composable
fun ImagePresentationTest() {
    Image(
        painter = painterResource(R.drawable.knowledge_category_1_article_12_small),
        modifier = Modifier.background(Color.Cyan).wrapContentSize(),
        contentScale = ContentScale.FillBounds,
        contentDescription = "",
    )

}
The image is 288x240 and it’s a PNG
Is there some limitation I’m failing to see?
a
Did you try
ContentScale.Crop
?
c
I tried all of them
a
You should not see the background using
FillBounds
, but the image will have distortion.
No transparent background?
c
Also thought about it but no, I have it in a larger export and it works fine
So Fill bounds should have at least filled the whole thing
a
I am not sure about
wrapContentSize
effect ...
c
what is wrapContentSize?
Let m e try
Nope, and I already tried this before, just not in the Image Modifier
I believe it’s just rendering wrong
a
Maybe. You could try using a wrapper like
Surface
by giving it a fixed size.
c
The problem is that the Image is created wrong
I can’t do an offset or resize it
it’s like the whole component is this weird image with leaking borders
I’m rendering bitmaps and this seems like nothing to do with compose
a
weird
sorry that i could not help you
c
Thank you any way
it’s good to exhaust all the options
🙂
👍 1