日期:2014-05-19  浏览次数:20911 次

制作水印图片叠加到原图后两图跌加处出现白点问题?(急)
运行都成功的,但是在跌加好的图片上,原图和跌加上去的图片交合处会出现白色斑点,高手帮帮我啊!
源码如下:
int   phWidth   =   imgPhoto.Width;
                        int   phHeight   =   imgPhoto.Height;

                        //创建一个与原图尺寸相同的位图
                        Bitmap   bmPhoto   =   new   Bitmap(phWidth,   phHeight,   PixelFormat.Format24bppRgb);
                        bmPhoto.SetResolution(imgPhoto.HorizontalResolution,   imgPhoto.VerticalResolution);

                        //位图装载到一个Graphics对象
                        Graphics   grPhoto   =   Graphics.FromImage(bmPhoto);
                        //grPhoto.

                        //用水印BMP文件创建一个image对象  
                        System.Drawing.Image   imgWatermark   =   imgTezh;
                        int   wmWidth   =   imgWatermark.Width;
                        int   wmHeight   =   imgWatermark.Height;

                        //设置图片质量
                        grPhoto.SmoothingMode   =   SmoothingMode.AntiAlias;

                        //以原始尺寸把照片图像画到此graphics对象
                        grPhoto.DrawImage(
                        imgPhoto,   //   Photo   Image   object
                        new   Rectangle(0,   0,   phWidth,   phHeight),   //   Rectangle   structure
                        0,   //   x-coordinate   of   the   portion   of   the   source   image   to   draw.  
                        0,   //   y-coordinate   of   the   portion   of   the   source   image   to   draw.  
                        phWidth,   //   Width   of   the   portion   of   the   source   image   to   draw.  
                        phHeight,   //   Height   of   the   portion   of   the   source   image   to   draw.  
                        GraphicsUnit.Pixel);   //   Units   of   measure