TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ali Alshihry
NA
23
987
Error Out of memory when dealing with tiff images in c# 2015
Feb 16 2018 11:08 PM
Hello
I'm working on c#
Has a problem when dealing with images of type Tiff in the following code:
public static Bitmap ResizeImage(Image pic, int w, int h)
{
Bitmap returnImag = new Bitmap(w, h);
returnImag.SetResolution(pic.HorizontalResolution, pic.VerticalResolution);
using (Graphics graphics = Graphics.FromImage(returnImag))
{
graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
graphics.DrawImage(pic, 0, 0, returnImag.Width, returnImag.Height);
}
return returnImag;
}
Note that if i put a message code to disable the implementation more than ten seconds between the image and the following image the previous code works
Do you have any suggestion to do code without placing a message
DialogResult result = MessageBox.Show("?? ???? ?????????????", " ????? ", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{ }
Thank you
Reply
Answers (
3
)
Download files from google drive and save to a folder
Send SMS from C# desktop app