Sfoglia il codice sorgente

修改颗粒列表原图不清晰问题

cxs 11 mesi fa
parent
commit
06407f0b94

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

@@ -220,13 +220,6 @@ namespace OTSIncAReportGrids
             }
             try
             {
-                //m_condition[OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE].itemVal = (int)IMAGE_DISPLAY_TYPE.DISTRIBUTION;
-                //var rstlist = m_conditionData.GetComboDownListByItemName(OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE);
-                //prop.SetPropByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE, rstlist[(int)IMAGE_DISPLAY_TYPE.DISTRIBUTION]);
-                //m_ReportApp.MoreSource = "";
-                //m_condition.SetDefaultConditionValue();
-                //m_condition.DisCurrentPicProperty();
-
                 lan = new Language(this);
                 table = lan.GetNameTable(this.Name);
                 m_mythread_state = false;
@@ -2720,10 +2713,6 @@ namespace OTSIncAReportGrids
 
                 }
             }
-            //if(m_ReportApp.im_Control_DrawDistrbutionImageAndBSE!=null)
-            //{
-            //    m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.DisplayParticleByParticlelist(Particleslist_selecttodisplay);
-            //}
         }
 
         public List<Particle> GetParticleslist_select()
@@ -2801,6 +2790,10 @@ namespace OTSIncAReportGrids
                         {
                             graphics.Clear(Color.White); // 清除位图背景为白色
                         }
+                        string filePath = result.FilePath + "\\FIELD_FILES\\";
+                        string imagePath = filePath + "Field" + dgvr.Cells["fieldid"].Value.ToString() + ".bmp";
+                        Bitmap m_originalImage = DrawFunction.ReadImageFile(imagePath);
+                        
                         foreach (Segment seg in particle.SegmentList)
                         {
                             int f_length = seg.Length;
@@ -2808,11 +2801,13 @@ namespace OTSIncAReportGrids
                             {
                                 int lsjs_x = seg.Start + m;
                                 int lsjs_y = seg.Height;
+                                var pixelColor = m_originalImage.GetPixel(lsjs_x, lsjs_y);
                                 dpImage.SetPixel(lsjs_x, lsjs_y, Color.Black);
                             }
                         }
                         Bitmap bmap = Particledata.GetBitmapByParticle(dpImage, rectangle);
-                        control_XRayTable1.SetBitmapOfPictureBox(ls_bp, bmap);
+                        Bitmap bmap1 = Particledata.GetBitmapByParticle(m_originalImage, rectangle);
+                        control_XRayTable1.SetBitmapOfPictureBox(bmap1, bmap);
                         Invalidate();
                     }
                     else

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

@@ -811,7 +811,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             if (offset_rect.Width > 0 && offset_rect.Height > 0)
             {
                 //最后通过list_showsegment组建成新的图片,进行返回
-                new_ret_bp = ls_bt.Clone(offset_rect, PixelFormat.Format8bppIndexed);
+                new_ret_bp = ls_bt.Clone(offset_rect, ls_bt.PixelFormat);
             }
             else
             {