image bmap;
idataobject data = system.windows.forms.clipboard.getdataobject();
bmap = (image)(data.getdata(typeof(system.drawing.bitmap)));
graphics g = graphics.fromimage(bmap);
solidbrush drawbrush = new solidbrush(color.red);
font drawfont = new font("arial", 10, fontstyle.bold, graphicsunit.millimeter);
int xpos = bmap.height - ( bmap.height-25 );
int ypos = 3;
g.drawstring ("zydzydyzydydydyyydydy", drawfont, drawbrush, xpos, ypos);
string spicpath = "d:\\filename.jpg";
string sprefix = "d:\\xxx";
image smbmap ;
smbmap = bmap.getthumbnailimage(bmap.width, bmap.height, null, system.intptr.zero);
smbmap.save(spicpath, system.drawing.imaging.imageformat.jpeg);
bmap.save(sprefix + ".jpg", system.drawing.imaging.imageformat.jpeg);
bmap = null;
smbmap = null;
文章整理:站长天空 网址:http://www.z6688.com/
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




