【发布时间】:2010-10-18 05:27:10
【问题描述】:
我有文件“Image_RGB565.raw”,其中包含 RGB565 格式的图像缓冲区。我希望这张图片显示在 ImageView 中。是否可以不用额外的代码转换为 RGB888?
我试过了
BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inPreferredConfig = Bitmap.Config.RGB_565; 位图位图 = BitmapFactory.decodeFile("Image_001_RGB565.raw");但位图为空。
然后我也尝试使用 bytearray 加载
BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inPreferredConfig = Bitmap.Config.RGB_565; 位图位图 = BitmapFactory.decodeFile(decodeByteArray(data, 0, data.length, opt);请指导我正确的方向。我的图片尺寸是 160x160。
【问题讨论】: