Compose Capture To Share Image

Render a composable off-screen into an ImageBitmap so a button can save or share it as a picture — a capture primitive ported into common code rather than pulled in as a platform-only dependency, a max-width ceiling standing in for a fixed output size, artwork that has to already be resolved before the button is even reachable, and an Android MediaStore save gated behind a permission that the same feature's Desktop save never needs. Use when a "share as image" feature exports a blank or half-drawn picture, when the exported picture comes out a different size on every device, or when saving works on some Android versions and fails silently on others.

maxrave-dev 17c0756 8.8 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/compose-capture-to-share-image commit 17c0756ffa

Frequently asked questions

npx skillmds@latest add maxrave-dev/compose-capture-to-share-image