Skip to content
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

[TIMOB-24465] Android: Replacing RGB_565 with ARGB_8888 #8942

Closed
wants to merge 1 commit into from

Conversation

kopiro
Copy link
Contributor

@kopiro kopiro commented Apr 7, 2017

To avoid funny gradients

JIRA: https://jira.appcelerator.org/browse/TIMOB-24465

To avoid funny gradients
@hansemannn
Copy link
Collaborator

How about performance: http://stackoverflow.com/a/15178050/5537752 ?

@hansemannn hansemannn changed the title Replacing RGB_565 with ARGB_8888 [TIMOB-24465] Android: Replacing RGB_565 with ARGB_8888 Apr 8, 2017
@hansemannn hansemannn requested review from garymathews and jquick-axway and removed request for garymathews April 8, 2017 09:31
@garymathews
Copy link
Contributor

garymathews commented Apr 8, 2017

Yep, ARGB_8888 should be used. It is the default on Android since 4.0 and the recommended configuration for Bitmaps. Also decreases colour banding by increased bits-per-pixel.

We should change all instances in source to use ARGB_8888:

TiBlob.java - Line 581
TiBlob.java - Line 717

This occurrence is to try and save space, but it will also cause colour banding:
TiUIHelper.java - Line 760

@hansemannn
Copy link
Collaborator

Thanks Gary! @kopiro can you update those files in this PR as well? Should be added to 6.1.0 as well.

@jquick-axway
Copy link
Contributor

I agree with Gary. We should always be loading images with 32-bit color. Especially since the 565 color format doesn't support alpha transparency. The days of the low-end 24 MB heap limited Android device is pretty much over.

The 3 other files source files Gary mentioned need to be changed as well.

Note:
This change will cause a merge conflict (but easy to resolve) with another change of mine where I too have updated TiDrawableReference to decode with 32-bit color.
https://jira.appcelerator.org/browse/TIMOB-24528

@garymathews
Copy link
Contributor

Close in favour of #8978

@hansemannn hansemannn added this to the 6.2.0 milestone May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants