繁体   English   中英

Bitmap 图像未锐化

[英]Bitmap Image is not sharpen

我在 Flutter 中包含了我的 android 应用程序的启动图像。 但是,此图像要么模糊要么太大。 当我在硬盘上查看图像时,它很清晰。 如何保持图像清晰?

/res/drawable/launch_background.xml:

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/background" />

    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/icon_transparent_256" />
    </item>
</layer-list>

/res/values/styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             Flutter draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
</resources>

当前结果:截图

实际图像:徽标

正如@Michael Dougan 指出的那样,图像尺寸太小,而不是在/res/drawable/中保存一个版本的启动图像,最好以不同的尺寸保存图像(例如/res/mipmap-xxxhdpi

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM