Click here to Skip to main content
15,891,677 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unable to read black and white image Pin
rizgar8-Jan-07 19:12
rizgar8-Jan-07 19:12 
QuestionEsc Key pressed Event Pin
swjam7-Jan-07 3:21
swjam7-Jan-07 3:21 
AnswerRe: Esc Key pressed Event Pin
Guffa7-Jan-07 3:33
Guffa7-Jan-07 3:33 
AnswerRe: Esc Key pressed Event Pin
Luc Pattyn7-Jan-07 7:54
sitebuilderLuc Pattyn7-Jan-07 7:54 
QuestionImage quality Pin
Mazdak7-Jan-07 2:15
Mazdak7-Jan-07 2:15 
AnswerRe: Image quality Pin
Nader Elshehabi7-Jan-07 2:43
Nader Elshehabi7-Jan-07 2:43 
GeneralRe: Image quality Pin
Mazdak7-Jan-07 3:42
Mazdak7-Jan-07 3:42 
AnswerRe: Image quality Pin
J. Dunlap7-Jan-07 3:16
J. Dunlap7-Jan-07 3:16 
You can use the Quality encoder parameter, which works only with the JPEG encoder. Here's how to specify a quality level when saving an image:
//Get all the image encoders and find the one for the JPEG format
ImageCodecInfo[] codecs=ImageCodecInfo.GetImageEncoders();
ImageCodecInfo codec = null;
foreach(ImageCodecInfo c in codecs)
{
   if(c.MimeType=="image/jpeg")
   {
      codec=c;
      break;
   }
}

//Create a list of encoder parameters with space for a single entry
EncoderParameters encoderParams=new EncoderParams(1);
//Create a parameter to pass to the codec, with the category "Quality" and 
//the desired quality value (where 100 is 100% quality)
EncoderParameter encoderParam=new EncoderParameter(Encoder.Quality, 90L);
//Add the parameter to the list of encoder parameters
encoderParams.Param[0]=encoderParam;

//Save the bitmap using the JPEG encoder and the parameter list
bmp.Save(filename,codec,encoderParams);



GeneralRe: Image quality Pin
Mazdak7-Jan-07 3:41
Mazdak7-Jan-07 3:41 
AnswerRe: Image quality Pin
Guffa7-Jan-07 3:49
Guffa7-Jan-07 3:49 
QuestionQuestion about Page_Load event... Pin
travich6-Jan-07 20:14
travich6-Jan-07 20:14 
AnswerRe: Question about Page_Load event... Pin
Guffa7-Jan-07 4:16
Guffa7-Jan-07 4:16 
QuestionAnother Question. Pin
travich7-Jan-07 7:51
travich7-Jan-07 7:51 
GeneralRe: Another Question. Pin
Guffa7-Jan-07 9:54
Guffa7-Jan-07 9:54 
QuestionCookie-less Authentication Pin
Rahithi6-Jan-07 17:42
Rahithi6-Jan-07 17:42 
AnswerRe: Cookie-less Authentication Pin
Christian Graus6-Jan-07 20:04
protectorChristian Graus6-Jan-07 20:04 
QuestionIssues with RemoveChild() Pin
csharpk0der1236-Jan-07 17:23
csharpk0der1236-Jan-07 17:23 
AnswerRe: Issues with RemoveChild() Pin
Christian Graus6-Jan-07 20:07
protectorChristian Graus6-Jan-07 20:07 
AnswerRe: Issues with RemoveChild() Pin
Luc Pattyn7-Jan-07 9:15
sitebuilderLuc Pattyn7-Jan-07 9:15 
QuestionI cant seem to think today. Pin
Captain See Sharp6-Jan-07 16:56
Captain See Sharp6-Jan-07 16:56 
AnswerRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 18:18
sitebuilderLuc Pattyn6-Jan-07 18:18 
GeneralRe: I cant seem to think today. Pin
Captain See Sharp6-Jan-07 18:43
Captain See Sharp6-Jan-07 18:43 
GeneralRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 19:02
sitebuilderLuc Pattyn6-Jan-07 19:02 
GeneralRe: I cant seem to think today. Pin
Captain See Sharp6-Jan-07 19:34
Captain See Sharp6-Jan-07 19:34 
GeneralRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 20:04
sitebuilderLuc Pattyn6-Jan-07 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.