ImageProxy to Bitmap bug on Samsung Galaxy A24

Skip to first unread message

Michael Kostner

Feb 5, 2024, 2:02:16 PMFeb 5
to Android CameraX Discussion Group

I am since long observing a bug affecting nearly exclusively the Samsung Galaxy A24, when transforming the imageProxy returned from onCaptureSuccess, into a Bitmap. I initially thought it was due to my own code, since I previously coded the transformation myself, however recently I have implemented CameraX's own .toBitmap() function, and the issue still persists. Below you can find the stack trace (I redacted some information with Xs for privacy reasons): 

Fatal Exception: java.lang.UnsupportedOperationException
Decode jpeg byte array failed

Fatal Exception: java.lang.UnsupportedOperationException: Decode jpeg byte array failed
       at java.util.concurrent.ThreadPoolExecutor.runWorker(
       at java.util.concurrent.ThreadPoolExecutor$

Is this a bug, or am I implementing something incorrectly here?

Kind regards, 

Scott Nien

Feb 5, 2024, 7:07:41 PMFeb 5
to Michael Kostner, Charcoal Chen, Android CameraX Discussion Group
This looks like the same issue as

Charcoal,  do you think our workaround can also fix the in-memory capture case ? 

You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Charcoal Chen

Feb 5, 2024, 9:38:41 PMFeb 5
to Scott Nien, Michael Kostner, Android CameraX Discussion Group
Yes, our workaround can also fix the issue for in-memory capture.

Scott Nien

Feb 5, 2024, 11:07:17 PMFeb 5
to Charcoal Chen, Michael Kostner, Android CameraX Discussion Group

Samsung has a fix for the issue that is included in the latest FOTA(different regions might receive the FOTA build at different times). And as Charcoal said,  CameraX also has a workaround for the issue that MIGHT fix the issue, the workaround will be included in the March release. 
Reply all
Reply to author
0 new messages