OneKeyHQ / OneKeyHQ/app-monorepo
[BUG]: RGB/RGBA Images Render as Black When Setting Hardware Wallet Wallpaper
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 535
- Avg merge
- 21h 55m
- Merged PRs (30d)
- 497
Description
**Describe the bug**
When prompted to load an image to change the hardware wallet's wallpaper, importing a colored image in RGB/RGBA format results in the image being rendered completely black.
Interestingly, the same image works correctly when it is first converted from RGB to Grayscale in Photoshop and its curves/contrast are adjusted before importing it into the application.
**To Reproduce**
Steps to reproduce the behavior:
1. Open the hardware wallet wallpaper customization flow.
2. Select a colored image in RGB/RGBA format.
3. Import and load the image.
4. Apply the image as the hardware wallet's wallpaper.
5. Observe that the resulting wallpaper is rendered completely black.
**Expected behavior**
The application should correctly process RGB/RGBA images and convert them into the appropriate image format required by the hardware wallet.
Users should not need to manually convert their images to grayscale using external software before importing them.
**Smartphone (please complete the following information):**
* Device: iPhone
* OS: iOS
**Additional context**
The issue appears to be related to how RGB/RGBA images are being interpreted or converted during the wallpaper processing pipeline.
As a potential fix, the application could preprocess supported images by automatically converting RGB/RGBA input into a normalized grayscale representation before passing it to the hardware wallet's image-processing pipeline.
A possible processing flow would be:
`RGB/RGBA → Normalize Color/Alpha → Grayscale → Tone/Curve Adjustment → Hardware Wallet Image Format`
It may also be useful to provide basic image adjustment controls, such as brightness, contrast, curves, or black/white point adjustment, so users can control how the image will appear on the hardware wallet before it is processed.
This would make the wallpaper workflow more robust and remove the need for users to manually preprocess images in Photoshop or other image-editing software.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in the hardware wallet wallpaper customization flow on iPhone with RGB/RGBA and grayscale images, then trace the image-processing path used before applying the wallpaper. Compare the color and grayscale inputs through conversion and hardware-wallet upload, and consider the issue done when supported RGB/RGBA images render correctly without external preprocessing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100