title: Android Canvas DrawBitmap poor quality
body: <p>I'm extending SurfaceView to create a fullscreen horizontally scrollable background.</p>
  
  <p>My issue is with the quality of the bitmap. When used in the draw-call as </p>
  
  <pre><code>canvas.drawBitmap(bitmap, 0, 0, paint);
  </code></pre>
  
  <p>It's quality is much poorer than its original. I'm not doing any scaling.</p>
  
  <pre><code>BitmapFactory.Options options = new BitmapFactory.Options();
  options.inPreferredConfig = Bitmap.Config.ARGB_8888;
  
  Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image, options);
  
  Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
  paint.setFilterBitmap(true);
  </code></pre>
  
  <p>Not sure if the images show it clearly, they're screenshots from the tablet. The good one is an ImageView with its src as the drawable.</p>
  
  <p>The canvas one has this horizontally stripy effect, its very significant in reality. This effect is vertical as well. It's whenever the gradient is slightly changing. As if the canvas' bitmap has much less colors..</p>
  
  <p>I'm sure there's a solution to this, but I could not find any.</p>
  
  <p><a href="http://i.imgur.com/M74cUfG.png" rel="nofollow">Poor quality example</a></p>
  
  <p><a href="http://i.stack.imgur.com/RQkWt.png" rel="nofollow">Real quality example</a></p>