0

I have an Image Composable component as in:

Image(
   ...
   bitmap = bitmap
   ...
)

That image component is further transformed, scaled and panned. Is it possible to get the resulting Bitmap or ImageBitmap out of this Image component?

kaneda
  • 5,981
  • 8
  • 48
  • 73
  • 1
    There's no "final bitmap", because transformations are applied on Compose level, and there's no access to how it's getting drawn. But you can capture it as showed in [this answer](https://stackoverflow.com/a/69391397/3585796) – Phil Dukhov Mar 27 '22 at 04:49
  • I figured so. I'll check that out, thanks for referencing – kaneda Mar 27 '22 at 14:52
  • 1
    The transformations are made to the surface onto which the Bitmap is drawn and not the bitmap itself. If you want the resulting image, you can capture the composable and draw it into a bitmap image. – Rafsanjani Mar 28 '22 at 09:42
  • That's what I ended up doing. Thanks! – kaneda Mar 30 '22 at 13:17

0 Answers0