using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace Képdarabolás
{
   static class Kiterjesztés
    {
        static public Image darabol(this Image kép,int balfx,int balfy,int szél, int mag)
        {

            BitmapImage bmpImage = new BitmapImage();
            bmpImage.BeginInit();
            bmpImage.UriSource = new Uri("./photo.jpeg", UriKind.RelativeOrAbsolute);
            bmpImage.EndInit();
            kép.Source = bmpImage;

            // Clipped Image
            Image clippedImage = new Image();
            clippedImage.Source = bmpImage;
            EllipseGeometry clipGeometry = new EllipseGeometry(new Point(50, 50), 20, 50);
            clippedImage.Clip = clipGeometry;
            return clippedImage;
        }
    }
}
