title: Cutting the image or photo into pieces
body: <p>Guys i am developing an puzzle game where in one part i want to cut the image to 15 pieces which fills the entire screen and also i need to arrange those pieces one below the other (ontouch screen).</p>
  
  <p>my image dimention is 414*310 and i got the code i am not sure how to go with it please help.</p>
  
  <p>i have my image in drawable folder.</p>
  
  <pre><code>public Bitmap[] splitBitmap(Bitmap picture)
  {
  Bitmap scaledBitmap = Bitmap.createScaledBitmap(picture, 240, 240, true);
  Bitmap[] imgs = new Bitmap[9];
  imgs[0] = Bitmap.createBitmap(scaledBitmap, 0, 0, 80 , 80);
  imgs[1] = Bitmap.createBitmap(scaledBitmap, 80, 0, 80, 80);
  imgs[2] = Bitmap.createBitmap(scaledBitmap,160, 0, 80,80);
  imgs[3] = Bitmap.createBitmap(scaledBitmap, 0, 80, 80, 80);
  imgs[4] = Bitmap.createBitmap(scaledBitmap, 80, 80, 80,80);
  imgs[5] = Bitmap.createBitmap(scaledBitmap, 160, 80,80,80);
  imgs[6] = Bitmap.createBitmap(scaledBitmap, 0, 160, 80,80);
  imgs[7] = Bitmap.createBitmap(scaledBitmap, 80, 160,80,80);
  imgs[8] = Bitmap.createBitmap(scaledBitmap, 160,160,80,80);
  return imgs;
  
  
  }
  </code></pre>
  
  <p>i am working on android 2.1</p>