Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:07:50+00:00 2026-05-29T10:07:50+00:00

I encountered the following problem. When any bitmap is loaded from resources by an

  • 0

I encountered the following problem. When any bitmap is loaded from resources by an application running on Ice Cream Sandwich, it will likely be rendered incorrectly as if it has been decoded to the format, which differs from the current window format, with no dither applied. However, both, the decoding format and window format have been explicitly set:

BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inPreferredConfig = Bitmap.Config.RGBA_8888;

and

getWindow().setFormat(PixelFormat.RGBA_8888);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);

Here are screenshots of the test app taken from this article running on Emulator with ICS 4.0.3 (it gives the same results on HTC HD2):

RGBA_8888 (32-bits) window format, various bitmap decoding formats:
32-bit window format

RGB_565 (16-bits) window format, various bitmap decoding formats:
16-bit window format

Several things could be noticed:

  • Dithering flag is not taken into account from time to time;
  • The default window format for ICS seems to be RGB_565;
  • The only good looking gradient appears with RGB_565 window format and RGBA_8888 bitmap decoding format.

This problem has also been reported in these questions, but still no solution can be found there:

Gradient compatibility issue – ICS defaults to fewer colors than all the previous versions of Android

Awful background image quality in Android

The quistion is, how to deal with all these formats on ICS, to be more precise, how to make ICS load bitmaps with RGBA_8888 format and how to set the window format to RGBA_8888 so these bitmaps are displayed correctly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:07:52+00:00Added an answer on May 29, 2026 at 10:07 am

    I can definitely assure you that the default window format is RGB888. This was actually made the default in Android 2.3, and has not been changed since them. At this point I would consider RGB565 windows deprecated, since basically all current devices have 32bpp displays.

    You say you are also running this on the HTC HD2, but since there is no official build for it I would be suspicious of any result you get there.

    I think the emulator may still use 16bpp displays, so in this area I would not rely on its results to exactly match what you will typically see on devices.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently encountered the following problem with my application: it didn't show any console
Has anyone encountered the following problem: I have IIS7 running on my computer. On
I'm writing a windows application in C++ and encountered the following problem when working
I'm learning C# and I encountered the following problem. I have two classes: base
while designing my user control, i encountered the following problem: i would like to
I have the following problem that other people must have encountered. I am working
I encountered a problem dealing with UTF-8, XML and Perl. The following is the
I'm working on custom pagination system and encountered following problem. When one of the
I'm new to PHP, HTML and MySQL, and have encountered the following problem: I
I've encountered a problem. I have a code which should read the following text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.