How to load BufferedImage in android?

前端 未结 1 408
耶瑟儿~
耶瑟儿~ 2020-11-27 22:28

I want to load BufferedImage in my application. For that I am using ImageIO but I am getting java.lang.NoClassDefFoundError:

相关标签:
1条回答
  • 2020-11-27 22:54

    ImageIO is not supported in Android SDK

    Could you achieve the same thing with Bitmap and BitmapFactory?? like so...

    Bitmap tgtImg = BitmapFactory.decodeFile("ImageD2.jpg");
    

    if tgtImg is not null after this then it was successful.

    0 讨论(0)
提交回复
热议问题