当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
Java抓取图像像素到int数组
发布时间:2010/6/30 11:02:55 来源:城市学习网 编辑:ziteng
  int w=im.getWidth(this);
  int h=im.getHeight(this);
  int[] pixels=new int[w*h];
  public int[] Image2intAarry(Image im){
  try{
  PixelGrabber pg=new PixelGrabber(im,0,0,w,h,pixels,0,w);
  pg.grabPixels();
  }catch(InterruptedException e){
  e.printStackTrace();
  }
  return pixels;
  }
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved