react / react/react-native

[Android] RNImage resize causes very long images to become blurry

オープン
#54,749 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: Image Issue: Author Provided Repro Platform: Android
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
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
Image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

RNImage の Android 実装と、issue で説明されている Fresco ResizeOptions の制限から始めてください。https://github.com/sookcha/RnTallImage の必須 reproducer を React Native 0.82.1 で実行し、非常に長い画像のリサイズを比較してください。画像が予期せずぼやけなくなり、意図した最大サイズの動作が定義され、適切なテストでカバーされていれば完了とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native
領域
mobile, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。