Beispiel #1
0
        private void GreyalizePixel(int x, int y, EditableBitmap _outputImage)
        {
            Color originalColor = _inputImage.GetPixel(x, y);
            int   colorValue    = SumColorValues(originalColor);

            colorValue = colorValue / 4;
            Color newColor = ColorFromValue(colorValue);

            _outputImage.SetPixelColor(x, y, newColor);
        }
 private void SetColor(EditableBitmap image, Int32Rect area, Color color)
 {
     for (int x = area.X; x < area.X + area.Width; x++)
     {
         for (int y = area.Y; y < area.Y + area.Height; y++)
         {
             image.SetPixelColor(x, y, color);
         }
     }
 }
Beispiel #3
0
        private void BlurPixel(int x, int y, EditableBitmap outputImage)
        {
            Color blurredColor = GetBlurredColor(GetSurroundingColors(x, y, _inputImage));

            outputImage.SetPixelColor(x, y, blurredColor);
        }