.net可以做到不失真的水印吗?
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality
可是对高质量的jpg来说,文字不但有锯齿,周边还是会变模糊~~
------解决方案--------------------
生成高质量的
高质量
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
System.Drawing.Imaging.ImageCodecInfo codec = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders()[1]; System.Drawing.Imaging.EncoderParameters eParams = new System.Drawing.Imaging.EncoderParameters(1);
eParams.Param[0] = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 100L);
------解决方案--------------------
传送门