I wanted to rescale a bitmap I tried a lot of functions to do it and no one worked with me because of color space, The error is "can't create bitmap without color spacing" I used the Bitmap.createScaledBitmap(params...)
And Bitmap.createBitmap(Bitmap source, int width, int height, Matrix matrix, boolean filter)
Always same exception, i don't know what to do with it
I get the same error for my custom view when I try to render it in Android Studio. The code however is working fine when run on the device itself.
Unfortunately ColorSpace
was added in API 26 and therefore I don't see any way of achieving this if the root of your problem is the same - which we don't know by the way.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.