troubleshooting Question

Size a TIFF in a Picture Box

Avatar of JElster
JElsterFlag for United States of America asked on
Microsoft DevelopmentC#
2 Comments2 Solutions940 ViewsLast Modified:
I'm trying to load a tiff in a picture box on Load(0  and change the size to 125%.
But I get an error INVALID PARAMETER...any ideas?

  imgOriginal = Image.FromFile("C:\\MyTiff.tif");
                this.tiffBox.Image = imgOriginal;

                            Bitmap bm = new Bitmap(imgOriginal, Convert.ToInt32(imgOriginal.Width * 125), Convert.ToInt32(imgOriginal.Height * 125));
                Graphics grap = Graphics.FromImage(bm);
                grap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;

                this.tiffBox.Image = bm;
Mike Tomlinson
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros