【问题标题】:YuvImage to DrawableYuvImage 到 Drawable
【发布时间】:2012-11-30 07:21:53
【问题描述】:

我有 YUV 格式的 byte[] 数据,我想创建一个 Drawable。

要做的很长的路是把它转换成RGB -> Bitmap -> BitmapDrawable。

一种更简单的方法是创建 YuvImage,但是否可以在不使用将其压缩为 jpeg 的情况下从中创建 Drawable?

【问题讨论】:

    标签: android image-processing android-view android-image android-drawable


    【解决方案1】:

    有趣的讨论 -> Converting YUV->RGB(Image processing)->YUV during onPreviewFrame in android?

    或者,您也可以将字节转换为 ColorMatrix 并使用 setYUV2RGB()

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-03
      • 2011-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多