E
Ersin Gençtürk
Hi ,
I am creating dynamic images (for example writing text into a bitmap) and
saving it to the output stream with gdi library in .net but I can't adjust
image quality.
The best parameters with everything is set to fine also gives me low quality
? how can I set the quality to the maximum ? What is wrong here ?
Bitmap pic = new Bitmap(width, height, PixelFormat.Format24bppRgb);
//some stuff here drawing picture
//saving the picture
ImageCodecInfo[] icf = ImageCodecInfo.GetImageEncoders();
EncoderParameters encps = new EncoderParameters( 1 );
EncoderParameter encp = new EncoderParameter(
System.Drawing.Imaging.Encoder.Quality,
(int)99 );
encps.Param[0] = encp;
pic.Save(Response.OutputStream,icf[2],encps);
I am creating dynamic images (for example writing text into a bitmap) and
saving it to the output stream with gdi library in .net but I can't adjust
image quality.
The best parameters with everything is set to fine also gives me low quality
? how can I set the quality to the maximum ? What is wrong here ?
Bitmap pic = new Bitmap(width, height, PixelFormat.Format24bppRgb);
//some stuff here drawing picture
//saving the picture
ImageCodecInfo[] icf = ImageCodecInfo.GetImageEncoders();
EncoderParameters encps = new EncoderParameters( 1 );
EncoderParameter encp = new EncoderParameter(
System.Drawing.Imaging.Encoder.Quality,
(int)99 );
encps.Param[0] = encp;
pic.Save(Response.OutputStream,icf[2],encps);