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
Manoj Tambe
NA
14
32.2k
A generic error occurred in GDI+
Sep 27 2011 10:37 AM
This is my Code
This code is working fine for the .jpeg/.Gif format
but i want to save image to .png format
this code gives Error
A generic error occurred in GDI+
public override void ExecuteResult(ControllerContext context)
{
PageHeading c = new PageHeading();
//Captcha c = new Captcha();
c.Text = _captchaText;
c.Width = 685;
c.Height = 50;
c.FamilyName = "FlemishScript BT";
HttpContextBase cb = context.HttpContext;
//MemoryStream MemStream = new MemoryStream();
cb.Response.Clear();
cb.Response.ContentType = "image/png";
c.Image.Save(cb.Response.OutputStream, System.Drawing.Imaging.ImageFormat.png);
//c.Image.Save(cb.Response.OutputStream, ImageFormat.png);
c.Dispose();
}
Reply
Answers (
5
)
Crystal Reports
Animating Rectangles to make them move around the screen randomly