hi
i have a wmf image file that is a map
i want to zoom on it but when i use common ways for zooming on the picture, it don't work for wmf file but work for another formats of a picture fine!
how can i zoom a wmf image file?
please suggest me your solutions
thanks in advance
Loading
Bahar JalaliPosted Dec 24, 2011, 6:49 AM
public Image PictureBoxZoom(Image img, Size size)
{
//Bitmap bm = new Bitmap(img, Convert.ToInt32(img.Width * size.Width), Convert.ToInt32(img.Height * size.Height));
Metafile imgOriginal = new Metafile("pic/Iran_political.wmf");
Graphics grap = Graphics.FromImage(imgOriginal);
grap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
return imgOriginal;
}
private void zoomSlider_Scroll(object sender, EventArgs e)
{
if (zoomSlider.Value > 0)
{
pictureBox1.Image = null;
pictureBox1.Image = PictureBoxZoom(imgOriginal, new Size(zoomSlider.Value, zoomSlider.Value));
}
}
on the bold line, it has an error : out of memory!
why?
how can i solve it?
my image size is about 5000 * 6000 , it's a map (wmf format picture).