title: Android Color formats (RGB565, ARGB8888)
body: <pre><code>    getHolder().setFormat(PixelFormat.RGBA_888);        
  
      Options options = new BitmapFactory.Options();       
      options.inDither=true;                               
      options.inScaled = true; 
      options.inPreferredConfig = Bitmap.Config.ARGB_8888; 
      options.inPurgeable=true;
  </code></pre>
  
  <p>(Bitmat created using options above)</p>
  
  <p>When using the above code, I get the following results.........</p>
  
  <ul>
  <li>No colour banding on my Tablet device</li>
  <li><p>Noticeable colour banding on test mobile (Samsung Galaxy Ace)</p>
  
  <pre><code>getHolder().setFormat(PixelFormat.RGBA_888);        
  
  Options options = new BitmapFactory.Options();       
  options.inDither=true;                               
  options.inScaled = true; 
  options.inPreferredConfig = Bitmap.Config.ARGB_565; 
  options.inPurgeable=true;
  </code></pre></li>
  <li><p>No colour banding on my tablet</p></li>
  <li>Noticible colour banding on the Galaxy Ace</li>
  <li><p>Same results as above</p>
  
  <pre><code>getHolder().setFormat(PixelFormat.RGB_565);     
  
  Options options = new BitmapFactory.Options();       
  options.inDither=true;                               
  options.inScaled = true; 
  options.inPreferredConfig = Bitmap.Config.RGB_565; 
  options.inPurgeable=true;
  </code></pre></li>
  <li><p>Colour banding on my tablet</p></li>
  <li><p>colour banding on the SG Ace</p>
  
  <pre><code>getHolder().setFormat(PixelFormat.RGB_565);     
  
  Options options = new BitmapFactory.Options();       
  options.inDither=true;                               
  options.inScaled = true; 
  options.inPreferredConfig = Bitmap.Config.ARGB_8888; 
  options.inPurgeable=true;
  </code></pre></li>
  <li><p>Colour banding on my tablet</p></li>
  <li>colour banding on the SG Ace</li>
  </ul>
  
  <p>So, in conclusion, only the PixelFormat.xxxx part seems to make any difference.  My understanding is that this is to set the holder colour format.  This will affect everything drawn. (ie, everything will take that format).</p>
  
  <p>Could someone explain what the purpose of the following line is please?</p>
  
  <p>options.inPreferredConfig = Bitmap.Config.xxxxxxx</p>
  
  <p>This doesn't seem to have any effect on the bitmap that has been drawn.</p>
  
  <p>Performance is paramount, so I may have to change my original png files so they don't have gradients, (ie, to draw them as RGB565 - is this advisable or should I stick with 8888?) or should dithering sort that out? (because as you can see, I have it enabled but it doesn't seem to help).</p>
  
  <p>Any ideas why the banding is always there on the Ace?  Could it be a hardware limitation?</p>
  
  <p>Thanks all this is very confusing.</p>
  
  <p>(PS I have read the official guide, I always look at that before posting a question to SO as well as looking at other related SO questions, but the official guide (as is too often the case), doesn't clear this up for me and I couldn't find the answers through other questions, so apologies if it is here already).</p>