PatilShreyas / Capturable

🚀Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image🖼️
https://patilshreyas.github.io/Capturable/
MIT License
1.05k stars 36 forks source link

Not able to capture Modifier.blur() #186

Closed Jithin-Jude closed 2 weeks ago

Jithin-Jude commented 3 months ago

I was trying to capture an Image composable modified with blur(). But it's not working so I had to use the lagacy RenderScript blurring method. Any idea why it's not capturing jepack compose blur?

PatilShreyas commented 3 months ago

Thanks for reporting the issue, will check this issue. Do you have a sample code?

Jithin-Jude commented 3 months ago

I was doing something similar to this:

val captureController = rememberCaptureController()

@Composable
fun MyView(captureController: CaptureController){
Image(
            bitmap = it.asImageBitmap(),
            contentDescription = null,
            modifier = Modifier
                .fillMaxSize()
                .blur(50.dp)
        )
}
PatilShreyas commented 2 weeks ago

I just tried it and found that if you use blur() modifier after capturable() one, it works, so closing this issue.