8000 Fix warning about unneeded alpha channel in image by Patrick-Kladek · Pull Request #339 · kean/Pulse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix warning about unneeded alpha channel in image #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Patrick-Kladek
Copy link

Description

I've spotted this error in the console and started investigating:

writeImageAtIndex:1025: ⭕️ ERROR: 'App' is trying to save an opaque image (44x44) with
'AlphaLast'. This would unnecessarily increase the file size and will double (!!!) the
required memory when decoding the image --> ignoring alpha.

Tasks

  • remove alpha channel from image to fix console warning.

Infos for Reviewer

This happened on App launch before any network requests started. Turns out we've used an AppIcon with an alpha channel. Even after replacing the App Icon with the correct format, we still see this error. Based on ChatGPT the UIImage class might still store the image with an alpha format for performance reasons. The only way to get rid of the error is to convert the image and remove the alpha channel.

I've made sure to only convert the image if its needed, to prevent unnecessary work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0