# jetpack-compose-layouts-and-modifiers

Published articles for jetpack-compose-layouts-and-modifiers.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Capturing composable to a bitmap without losing a state

DevFeed: [Capturing composable to a bitmap without losing a state](<https://devfeed.tech/articles/capturing-composable-to-a-bitmap-without-losing-a-state-25705.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/capturing-composable-to-a-bitmap-without-losing-a-state/>)

Author: Shreyas Patil

Published: 2024-03-20T13:58:20Z

Content type: article

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Stateful](<https://devfeed.tech/topics/stateful.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Cache](<https://devfeed.tech/topics/cache.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [api](<https://devfeed.tech/tags/api.md>), [button](<https://devfeed.tech/tags/button.md>), [caching](<https://devfeed.tech/tags/caching.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [capture](<https://devfeed.tech/tags/capture.md>), [component](<https://devfeed.tech/tags/component.md>), [compose](<https://devfeed.tech/tags/compose.md>), [counter](<https://devfeed.tech/tags/counter.md>), [github](<https://devfeed.tech/tags/github.md>), [image](<https://devfeed.tech/tags/image.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [jetpack-compose-layouts-and-modifiers](<https://devfeed.tech/tags/jetpack-compose-layouts-and-modifiers.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [mobile-development](<https://devfeed.tech/tags/mobile-development.md>), [network](<https://devfeed.tech/tags/network.md>), [performance](<https://devfeed.tech/tags/performance.md>), [render](<https://devfeed.tech/tags/render.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [screen](<https://devfeed.tech/tags/screen.md>), [screenshot](<https://devfeed.tech/tags/screenshot.md>), [size](<https://devfeed.tech/tags/size.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

Compose 1.6.x added an API that redirects composable rendering for bitmap capture, and the Capturable library adopted it in v2.0.0 as a more efficient alternative to wrapping content in a View and drawing its Canvas. The excerpt reports that adding the capture modifier to stateful, changing content such as a continuous counter can break both capture and the component's UI state. Its described approach caches a temporary rendering and transfers it to the main canvas, skipping repeated work when size and relevant state are unchanged. The excerpt cuts off as it begins identifying the cause, so it does not establish the full failure mechanism or a fix.

### Source excerpt

Learn how to capture a Jetpack Compose Composable as a Bitmap without losing its current state. A deep dive into capturing high-quality UI screenshots programmatically.