Click here to Skip to main content
15,914,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trimming string after a specified character Pin
Colin Angus Mackay7-Jan-07 5:49
Colin Angus Mackay7-Jan-07 5:49 
GeneralRe: Trimming string after a specified character Pin
Guffa7-Jan-07 5:49
Guffa7-Jan-07 5:49 
AnswerRe: Trimming string after a specified character Pin
Colin Angus Mackay7-Jan-07 5:47
Colin Angus Mackay7-Jan-07 5:47 
AnswerRe: Trimming string after a specified character Pin
Tyler457-Jan-07 18:33
Tyler457-Jan-07 18:33 
GeneralRe: Trimming string after a specified character Pin
teejayem7-Jan-07 6:40
teejayem7-Jan-07 6:40 
AnswerRe: Trimming string after a specified character Pin
Kumuda K9-Jan-07 0:25
Kumuda K9-Jan-07 0:25 
QuestionNode Delete Problem? Pin
sajid.salim.khan7-Jan-07 5:36
sajid.salim.khan7-Jan-07 5:36 
AnswerRe: Node Delete Problem? Pin
Ed.Poore7-Jan-07 5:59
Ed.Poore7-Jan-07 5:59 
AnswerRe: Node Delete Problem? Pin
Rob Graham7-Jan-07 6:03
Rob Graham7-Jan-07 6:03 
AnswerRe: Node Delete Problem? Pin
Christian Graus7-Jan-07 9:34
protectorChristian Graus7-Jan-07 9:34 
QuestionCOM Port Settings Pin
sajid.salim.khan7-Jan-07 5:18
sajid.salim.khan7-Jan-07 5:18 
AnswerRe: COM Port Settings Pin
Mostafa Siraj7-Jan-07 8:50
Mostafa Siraj7-Jan-07 8:50 
QuestionMay be a stupid question... Pin
hprahul7-Jan-07 4:39
hprahul7-Jan-07 4:39 
AnswerRe: May be a stupid question... Pin
Rob Graham7-Jan-07 6:05
Rob Graham7-Jan-07 6:05 
QuestionUnable to read black and white image Pin
code_explorer7-Jan-07 4:39
code_explorer7-Jan-07 4:39 
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 

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.