MyImage.ImageOpened += new EventHandler(Image_ImageOpened);
}
void Image_ImageOpened(object sender, RoutedEventArgs e)
{
Image img = (Image)sender;
BitmapImage bi = (BitmapImage)img.Source;
double width = bi.PixelWidth;
double height = bi.PixelHeight;
}
Thanks for that tip. I'm usually having trouble in getting the actual width and height of an image. With this code, I think I now know how to.
ReplyDeleteweb design Perth
Thanks for the code. I was having problems adjusting the width and height of an image.
ReplyDeleteexperiential marketing agency
I tried this code and it worked for some images, but it didn't work for images that are a bit big in size. Thanks for the help!
ReplyDeleteThanks for sharing this coding for adjusting width and height of image
ReplyDeleteThanks for the help. Sometimes a little help makes a huge difference.
ReplyDelete