【问题标题】:How can I improve image display quality?如何提高图像显示质量?
【发布时间】:2020-04-21 08:30:57
【问题描述】:

Original image

Screenshot

当我尝试在我的应用程序中加载图像时,感觉好像它没有正确拉伸。 我尝试了“适合”参数的所有选项 什么也没发生

这是我的代码

SingleChildScrollView(
  child: Container(
    width: width,
    child: Image.network(
      'https://img4.manga-chan.me/manga/-9new/t/1568958338_the-gamer-tom-4-glava-290/001.png',
      filterQuality: FilterQuality.high,
      fit: BoxFit.cover,
    ),
  ),
)

我应该怎么做才能使图像具有原始质量?

【问题讨论】:

    标签: flutter flutter-image


    【解决方案1】:

    做到了,它帮助了我

    在容器中包裹滚动

    double width = MediaQuery.of(context).size.width;
    double height = MediaQuery.of(context).size.height;
    
    Container(
      width: width,
      height: height,
      child: SingleChildScrollView(
        child: Image.network(
          'https://img4.manga-chan.me/manga/-9new/t/1571807955_the-gamer-tom-4-glava-296/002.png',
          filterQuality: FilterQuality.high,
          fit: BoxFit.fitWidth,
        ),
      ),
    )
    

    【讨论】:

    • @JoãoSoares 我将滚动条放入容器中,并为其分配了固定的屏幕宽度和高度。之后,卷轴内的图像开始正确拉伸。
    • 啊。所以这实际上不是图像质量的问题,而是您定义尺寸的方式。你的问题和回答有点误导。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-30
    • 1970-01-01
    • 2014-03-10
    • 1970-01-01
    • 2011-09-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多