[Android] RNImage resize causes very long images to become blurry
未关闭
还没有人认领这个 Issue。
Component: Image
Issue: Author Provided Repro
Platform: Android
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
- RNImage causes very long images to become blurry when resized
- I know it uses Fresco under the hood and Fresco has a limitation of up to 2K resolution, but at least it accepts a configurable max size
- Also recent Android devices can draw much larger than 2K
- I think React Native Image should accept a max size option too
- Or we can update Fresco max size limit
Steps to reproduce
- Load a very large image with RNImage
React Native Version
0.82.1
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: macOS 26.1
CPU: (8) arm64 Apple M1 Pro
Memory: 212.97 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.18.0
path: /Users/hoseongson/.local/share/mise/installs/node/22.18.0/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 10.9.3
path: /Users/hoseongson/.local/share/mise/installs/node/22.18.0/bin/npm
Watchman:
version: 2025.11.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/hoseongson/.local/share/mise/installs/ruby/3.3.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.1
- iOS 26.1
- macOS 26.1
- tvOS 26.1
- visionOS 26.1
- watchOS 26.1
Android SDK: Not Found
IDEs:
Android Studio: 2025.2 AI-252.25557.131.2521.14432022
Xcode:
version: 26.1.1/17B100
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.17
path: /Users/hoseongson/.local/share/mise/installs/java/corretto-17.0.17.10.1/bin/javac
Ruby:
version: 3.3.0
path: /Users/hoseongson/.local/share/mise/installs/ruby/3.3.0/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.1
wanted: 19.1.1
react-native:
installed: 0.82.1
wanted: 0.82.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
Stacktrace or Logs
N/A
MANDATORY Reproducer
https://github.com/sookcha/RnTallImage
Screenshots and Videos
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 RNImage 的 Android 实现以及 issue 中描述的 Fresco ResizeOptions 限制开始。使用 React Native 0.82.1 运行 https://github.com/sookcha/RnTallImage 中的强制 reproducer,并比较超长图像的缩放效果。当图像不再出现意外模糊、预期的最大尺寸行为已定义并由适当的测试覆盖时,即可视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, react-native
- 领域
- mobile, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100