Image image = ImageHandler.getImage("bb.jpg", getClass());
t.addImage(image, 0);
try {
t.waitForAll();
} catch (InterruptedException e) {
e.printStackTrace();
}
ImageWriter imageWriter = new ImageWriter();
emf.add(new SetStretchBltMode(EMFConstants.COLORONCOLOR));
emf.add(new StretchDIBits(imageWriter, bounds, 0, 0,
image.getWidth(this), image.getHeight(this), image, this, Color.black));
我想请教下在以上一段关于图形提取的程序中emf.add(new StretchDIBits(imageWriter, bounds, 0, 0,
image.getWidth(this), image.getHeight(this), image, this, Color.black));这句程序是什么意思??
这句可以分成下列两句,基本意思是先用一系列参数生成一个StretchDIBits对象,再将其放入emf中.
StretchDIBits obj = new StretchDIBits(
imageWriter,
bounds,
0,
0,
image.getWidth(this),
image.getHeight(this),
image,
this,
Color.black);
emf.add(obj);