不要d出另存为的对话框
string filepath="1jpg";//原路径
string picType = filepathSubstring(picPathLastIndexOf("") + 1, (picPathLength - picPathLastIndexOf("") - 1));
switch (picType)
{
case "bmp":
Bitmap bt = new Bitmap(ptbNewPicImage);
Bitmap mybmp = new Bitmap(bt, igWidth, igHeight);
if(FileExists(filepath))
FileDelete(filepath);
mybmpSave(filepath, ImageFormatBmp); break;
case "jpeg":
Bitmap bt1 = new Bitmap(ptbNewPicImage);
Bitmap mybmp1 = new Bitmap(bt1, ptbNewPicWidth, ptbNewPicHeight);
if(FileExists(filepath))
FileDelete(filepath);
mybmp1Save(filepath, ImageFormatJpeg); break;
case "gif":
Bitmap bt2 = new Bitmap(ptbNewPicImage);
Bitmap mybmp2 = new Bitmap(bt2, ptbNewPicWidth, ptbNewPicHeight);
if(FileExists(filepath))
FileDelete(filepath);
mybmp2Save(filepath, ImageFormatGif); break;
case "png":
Bitmap bt3 = new Bitmap(ptbNewPicImage);
Bitmap mybmp3 = new Bitmap(bt3, ptbNewPicWidth, ptbNewPicHeight);
if(FileExists(filepath))
FileDelete(filepath);
mybmp3Save(filepath, ImageFormatPng); break;
以上就是关于急求PC-dims测量软件下载地址!全部的内容,包括:急求PC-dims测量软件下载地址!、文件的扩展名一共有多少种、目前网络时间服务有哪几种协议等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)