Пример #1
0
 public void Blur(GaussianBlur blur, BlurEdgeMode edgeMode)
 {
     var temp = new BitmapRam(Width, Height);
     using (UseWrite())
     using (temp.UseWrite())
     {
         PreMultiply();
         blur.Horizontal(this, temp, edgeMode);
         blur.Vertical(temp, this, edgeMode);
         UnPreMultiply();
     }
 }
Пример #2
0
 public void Blur(GaussianBlur blur, BlurEdgeMode edgeMode, bool horz, bool vert)
 {
     if (!horz && !vert)
         return;
     if (horz && vert)
     {
         Blur(blur, edgeMode);
         return;
     }
     var temp = ToBitmapRam();
     using (temp.UseWrite())
     using (UseWrite())
     {
         temp.PreMultiply();
         if (horz)
             blur.Horizontal(temp, this, edgeMode);
         else
             blur.Vertical(temp, this, edgeMode);
         UnPreMultiply();
     }
 }