Click here to Skip to main content
15,564,333 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unable to read black and white image Pin
rizgar8-Jan-07 20:12
rizgar8-Jan-07 20:12 
QuestionEsc Key pressed Event Pin
swjam7-Jan-07 4:21
swjam7-Jan-07 4:21 
AnswerRe: Esc Key pressed Event Pin
Guffa7-Jan-07 4:33
Guffa7-Jan-07 4:33 
AnswerRe: Esc Key pressed Event Pin
Luc Pattyn7-Jan-07 8:54
sitebuilderLuc Pattyn7-Jan-07 8:54 
QuestionImage quality Pin
Mazdak7-Jan-07 3:15
Mazdak7-Jan-07 3:15 
AnswerRe: Image quality Pin
Nader Elshehabi7-Jan-07 3:43
Nader Elshehabi7-Jan-07 3:43 
GeneralRe: Image quality Pin
Mazdak7-Jan-07 4:42
Mazdak7-Jan-07 4:42 
AnswerRe: Image quality Pin
J. Dunlap7-Jan-07 4:16
J. Dunlap7-Jan-07 4: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 4:41
Mazdak7-Jan-07 4:41 
AnswerRe: Image quality Pin
Guffa7-Jan-07 4:49
Guffa7-Jan-07 4:49 
QuestionQuestion about Page_Load event... Pin
travich6-Jan-07 21:14
travich6-Jan-07 21:14 
AnswerRe: Question about Page_Load event... Pin
Guffa7-Jan-07 5:16
Guffa7-Jan-07 5:16 
QuestionAnother Question. Pin
travich7-Jan-07 8:51
travich7-Jan-07 8:51 
GeneralRe: Another Question. Pin
Guffa7-Jan-07 10:54
Guffa7-Jan-07 10:54 
QuestionCookie-less Authentication Pin
Rahithi6-Jan-07 18:42
Rahithi6-Jan-07 18:42 
AnswerRe: Cookie-less Authentication Pin
Christian Graus6-Jan-07 21:04
mveChristian Graus6-Jan-07 21:04 
QuestionIssues with RemoveChild() Pin
csharpk0der1236-Jan-07 18:23
csharpk0der1236-Jan-07 18:23 
AnswerRe: Issues with RemoveChild() Pin
Christian Graus6-Jan-07 21:07
mveChristian Graus6-Jan-07 21:07 
AnswerRe: Issues with RemoveChild() Pin
Luc Pattyn7-Jan-07 10:15
sitebuilderLuc Pattyn7-Jan-07 10:15 
QuestionI cant seem to think today. Pin
Captain See Sharp6-Jan-07 17:56
Captain See Sharp6-Jan-07 17:56 
AnswerRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 19:18
sitebuilderLuc Pattyn6-Jan-07 19:18 
GeneralRe: I cant seem to think today. Pin
Captain See Sharp6-Jan-07 19:43
Captain See Sharp6-Jan-07 19:43 
GeneralRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 20:02
sitebuilderLuc Pattyn6-Jan-07 20:02 
GeneralRe: I cant seem to think today. Pin
Captain See Sharp6-Jan-07 20:34
Captain See Sharp6-Jan-07 20:34 
GeneralRe: I cant seem to think today. Pin
Luc Pattyn6-Jan-07 21:04
sitebuilderLuc Pattyn6-Jan-07 21: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.