瀏覽代碼

修改报告程序大颗粒合成时图片分辨率固定的bug

CXS 3 年之前
父節點
當前提交
46571e4d62

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -658,7 +658,7 @@ namespace OTSIncAReportGrids
                                 double xs = pixw / ScanFieldSize;
 
                                 particleM = particleM + "," + subt;
-                                Bitmap bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath);
+                                Bitmap bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width);
                                 if (bmap != null)
                                 {
                                     string[] str = subt.Split(',');

+ 2 - 2
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -383,7 +383,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         Bitmap tempbit = fielddata.ReadImageFile(str_imagePath);
                         int pixw = tempbit.Width;
                         double xs = pixw / ScanFieldSize;
-                        bp_particle = fielddata.GetBitmapForBig(str_subparticles, xs, str_resultPath);
+                        bp_particle = fielddata.GetBitmapForBig(str_subparticles, xs, str_resultPath, tempbit.Height, tempbit.Width);
                     }
                     else
                     {
@@ -753,7 +753,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         Bitmap tempbit = fielddata.ReadImageFile(str_imagePath);
                         int pixw = tempbit.Width;
                         double xs = pixw / ScanFieldSize;
-                        bp_particle = fielddata.GetBitmapForBig(str_subparticles, xs, str_resultPath);
+                        bp_particle = fielddata.GetBitmapForBig(str_subparticles, xs, str_resultPath, tempbit.Height, tempbit.Width);
                     }
                     else
                     {

+ 3 - 3
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -457,7 +457,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             return DT;
         }
 
-        public Bitmap GetBitmapForBig(string sub, double xs, string path)
+        public Bitmap GetBitmapForBig(string sub, double xs, string path,int picHeight,int picWidth)
         {
             string vs = "," + sub.Replace(':', '-') + ",";
 
@@ -519,8 +519,8 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                     MIN_Y = lrfttopYH;
                 }
             }
-            int WIDTH = Convert.ToInt32(MAX_X - MIN_X) + 1024;
-            int HEIGHT = Convert.ToInt32(MAX_Y - MIN_Y) + 768;
+            int WIDTH = Convert.ToInt32(MAX_X - MIN_X) + picWidth;
+            int HEIGHT = Convert.ToInt32(MAX_Y - MIN_Y) + picHeight;
             //构造最终的图片白板
             Bitmap tableChartImage = new Bitmap(WIDTH, HEIGHT);
             Graphics graph = Graphics.FromImage(tableChartImage);