Exemplo n.º 1
0
 public static BitmapSource Transform(this BitmapSource bitmap, Transform transform)
 {
     var rotated = bitmap.Rotate(transform.Rotation);
     var cropInPixels = transform.Bounds.ConverToRawPixels(bitmap.DpiX, bitmap.DpiY);
     return rotated.Crop(cropInPixels);
 }
Exemplo n.º 2
0
 public BitmapSource Transform(BitmapSource bitmap, Transform transform)
 {
     var rotated = Rotate(bitmap, transform.Rotation);
     var cropInPixels = transform.Bounds.ConverToRawPixels(bitmap.DpiX, bitmap.DpiY);
     return Crop(rotated, cropInPixels);
 }
Exemplo n.º 3
0
        public IImage Transform(IImage bitmap, Transform transform)
        {
            var rotated = Rotate(bitmap, transform.Rotation);

            return(Crop(rotated, transform.Bounds));
        }