HEIC图像的透明背景为黑色

时间:2020-02-05 05:55:05

标签: android-studio kotlin heic

我正在将具有透明背景的PNG图像更改为HEIC格式。我想使用Android Studio的ImageView显示修改后的图像。为了使用HEIC文件,我使用了素材资源文件夹和ImageDecoder。

但是,HEIC的透明背景变为黑色。 我在各种网站上都将png转换为heic,并使用Mac预览应用程序将其导出,但无法阻止背景变黑。如果您解决了,我将不胜感激。

这是我的代码:

Project!
<androidx.appcompat.widget.AppCompatImageView
    android:layout_width="287dp"
    android:layout_height="557.5dp"
    android:layout_marginStart="1.8dp"
    android:background="@android:color/transparent"
    android:id="@+id/main_character"
    android:layout_alignParentBottom="true"/>

0 个答案:

没有答案
相关问题