某些情况下会用到这种非主流的转换方式,最近项目中用到,记录下。

ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.PNG, 100, baos);
InputStream isBm = new ByteArrayInputStream(baos.toByteArray());

 

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-08-17
  • 2021-10-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案