resizeImage

        private void resizeImage(Image fullsizeImage, string destFilename, int destWidth, int destHeight)
        {
            // Prevent using images internal thumbnail
            fullsizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);
            fullsizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);
            // Resize the image
            Image destImage = fullsizeImage.GetThumbnailImage(destWidth, destHeight, null, IntPtr.Zero);
            // Save the resized picture
            destImage.Save(destFilename);
            System.Diagnostics.Trace.WriteLine(“Debug: Path=” + destFilename);
        }

Leave a Reply

Your email address will not be published. Required fields are marked *