title: Are there similar android methods of java getData().getPixels()?
body: <p>I'm trying to use the following code of java to read image data on android. Since ImageIO is not supported, what are some ways I may use getData().getPixels()?</p>
  
  <p>By changing BufferedImage into Bitmap, I can get all other codes working besides bi.getData().getPixels()? </p>
  
  <p>Any method in the android library I may use to replace it?</p>
  
  <p>In  android Bitmap class:
  public void getPixels (int[] pixels, int offset, int stride, int x, int y, int width, int height)</p>
  
  <p>This method supports int[], but not double[]. I'm not familiar with image processing will they be different?</p>
  
  <p>Thank you.</p>
  
  <pre><code>    private double[] getImageData(String imageFileName) throws FaceRecError {
      BufferedImage bi = null;
      double[] inputFace = null;
      try{
          bi = ImageIO.read(new File(imageFileName));
      }catch(IOException ioe){
          throw new FaceRecError(ioe.getMessage());
      }
      if (bi != null){
      int imageWidth = bi.getWidth();
      int imageHeight = bi.getHeight();
      inputFace = new double[imageWidth * imageHeight];
      bi.getData().getPixels(0, 0, imageWidth, imageHeight,inputFace);
      }
      return inputFace;
  }   
  </code></pre>