Compose-Image
Compose-Image copied to clipboard
Stretched image on after side
Hi, I am using the BeforeAfter image in my project. I came across a bug. It is reproducible. The after image stretched on my test phone. My phone is: Samsung Galaxy A5 Android: 8.0.0

Hi CΓΌneyt. I don't have the device you experience the issue. Would you mind sending or debugging
drawImage(
beforeImage,
srcSize = IntSize(bitmapWidth, bitmapHeight),
srcOffset = IntOffset(srcOffsetX, 0),
dstSize = IntSize(width, height),
dstOffset = IntOffset(dstOffsetX, 0),
alpha = alpha,
colorFilter = colorFilter,
filterQuality = filterQuality
)
dstSize, dstOffset, and Canvas size might be leading to incorrect calculations?
Hi again, thank you for replying. The variable values are like that for my case. bitmapWidth = 1224 bitmapHeight = 1632
canvasWidth = 756.0 canvasHeight = 1008.0
srcOffsetX = 612 dstOffsetX = 378
srcOffset = 612,0 dstSize = 756x1008 dstOffset = 378,0