Fresco 对大图 (>2048px) 的自动调整大小可以 disabled/tuned 吗?

Can Fresco's automatic resizing on big images (>2048px) be disabled/tuned?

对于尺寸大于 2048 像素的 Fresco automatically applies a resizing

Android cannot display images more than 2048 pixels long in either dimension. This is beyond the capability of the OpenGL rendering system. Fresco will resize your image if it exceeds this limit.

我知道这是 OpenGL Android limit 的解决方法,但是有什么方法可以控制它吗?

以下是 Fresco 如何使用默认设置渲染 750x2440 图像的示例:

这里是 Picasso 上使用默认设置的同一张图片:

我已经试过玩 Fresco 的 resizing/downsampling 但没有成功。

Gist of the code used in the images above

P.S.: Here's the URL of the image used in my testing

我可以仅使用 isResizeAndRotateEnabledForNetwork() from the ImagePipelineConfig class 来实现这一点,我不需要调整下采样。

初始化Fresco时需要添加一个额外的步骤(在应用中class);通过 configuring 图像管道。

这是 MyApplication class 的样子:

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        ImagePipelineConfig pipelineConfig = ImagePipelineConfig.newBuilder(this)
                .setResizeAndRotateEnabledForNetwork(false)
                .build();
        Fresco.initialize(this, pipelineConfig);
    }
}

因此,不要使用 Fresco.initialize(this) 初始化 Fresco,而是添加一个 ImagePipeline class,将其配置为禁用使用 .setResizeAndRotateEnabledForNetwork(false) 从网络调整图像大小,然后传递配置的管道 class 到 Fresco。

设置为false时:

然后当它设置为 true(很可能是默认值)时: