internal string MergeImage(string slbh) { MergeImgHelp mih = new MergeImgHelp(); List <string> tstybm = GetTstybm(slbh); List <string> fileIds = GetFiled(tstybm); List <string> imgPath = GetImagePath(fileIds); if (!Directory.Exists(tmpDir)) { Directory.CreateDirectory(tmpDir); } GetIamgeFromFTP(imgPath); DirectoryInfo dir = new DirectoryInfo(tmpDir); FileInfo[] fileNames = dir.GetFiles(); if (null != fileNames && fileNames.Length > 0) { foreach (FileInfo item in fileNames) { FileStream stream = new FileStream(item.FullName, FileMode.Open); mih.ZoomAuto(stream, item.FullName, 1287, 1059, "", ""); stream.Close(); //item.Delete(); } string mergepath = Merge(fileNames, slbh); string path = UploadToFTP(slbh, mergepath); DeleteDirFile(tmpDir); return(path); } return(string.Empty); }
private string Merge(FileInfo[] fileNames, string slbh) { string source = tmpDir + slbh + ".jpg"; MergeImgHelp mih = new MergeImgHelp(); mih.CombineImages(fileNames, source); return(source); }