|
Hi
Say, my image width = 100 and height=500 I would like to draw the image in a rectangle where rectangle width = 100 but height = 300 if I use gfx.DrawImage(image, 0, 0, 100, 300); image is stretch in height. So, Is there any way to crop the image of 100x500 by 100x300?
I have tried by below
XImage img = XImage.FromFile(imgPath); XRect xSrcRect = new XRect(0,0, 100, 500); XRect xCropRect = new XRect(0, 0, 100, 300); gfx.DrawImage(img, xSrcRect, xCropRect, XGraphicsUnit.Point);
But no luck
Thanks Shahdat
|