示例#1
0
 public static Bitmap ToSepia(Bitmap source)
 {
     using (ColorMatrix saturation = new ColorMatrix())
         using (ColorMatrix rgbFilter = new ColorMatrix())
         {
             saturation.SetSaturation(0f);
             rgbFilter.SetScale(1.0f, 0.95f, 0.82f, 1.0f);
             saturation.SetConcat(rgbFilter, saturation);
             return(ColorSpaceTransformation.ToColorSpace(source, saturation));
         }
 }