To do that first of all you have to create a function like below.
Code:
public ImageSource ResizeImage(ImageSource biInput, double DeltaX, double DeltaY)
{
WriteableBitmap otpt;
ScaleTransform stTmp = new System.Windows.Media.ScaleTransform();
stTmp.ScaleX = DeltaX;
stTmp.ScaleY = DeltaY;
Image imgTemp = new Image();
imgTemp.Source = biInput;
otpt = new WriteableBitmap(imgTemp, stTmp);
return otpt;
}
After that you have to call that function like below.
Code:
BitmapImage btm = new BitmapImage(new Uri("http://efmediasrv08/welcome.png"));
image1.Source = ResizeImage(btm, .5, .5);
Bookmarks