Click here to Skip to main content
15,915,702 members
Home / Discussions / C#
   

C#

 
QuestionDatabinding problem Pin
ejbing1-Mar-07 12:37
ejbing1-Mar-07 12:37 
AnswerRe: Databinding problem Pin
Mike Hankey2-Mar-07 13:04
mveMike Hankey2-Mar-07 13:04 
GeneralRe: Databinding problem Pin
ejbing11-Mar-07 12:34
ejbing11-Mar-07 12:34 
QuestionTrying to draw using System.Drawing.Drawing2D Pin
laura13161-Mar-07 12:18
laura13161-Mar-07 12:18 
AnswerRe: Trying to draw using System.Drawing.Drawing2D Pin
Christian Graus1-Mar-07 12:33
protectorChristian Graus1-Mar-07 12:33 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
laura13161-Mar-07 12:39
laura13161-Mar-07 12:39 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 12:42
sitebuilderLuc Pattyn1-Mar-07 12:42 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
laura13161-Mar-07 12:50
laura13161-Mar-07 12:50 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Christian Graus1-Mar-07 12:55
protectorChristian Graus1-Mar-07 12:55 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 13:30
sitebuilderLuc Pattyn1-Mar-07 13:30 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Christian Graus1-Mar-07 13:33
protectorChristian Graus1-Mar-07 13:33 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 13:46
sitebuilderLuc Pattyn1-Mar-07 13:46 
AnswerRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 12:40
sitebuilderLuc Pattyn1-Mar-07 12:40 
QuestionHow do I pass and reference a Panel? Pin
dino20941-Mar-07 12:05
dino20941-Mar-07 12:05 
AnswerRe: How do I pass and reference a Panel? Pin
Dawid Mazuruk1-Mar-07 12:17
Dawid Mazuruk1-Mar-07 12:17 
GeneralRe: How do I pass and reference a Panel? Pin
dino20941-Mar-07 12:21
dino20941-Mar-07 12:21 
GeneralRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:37
protectorChristian Graus1-Mar-07 12:37 
GeneralRe: How do I pass and reference a Panel? Pin
Luc Pattyn1-Mar-07 12:32
sitebuilderLuc Pattyn1-Mar-07 12:32 
GeneralRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:36
protectorChristian Graus1-Mar-07 12:36 
AnswerRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:38
protectorChristian Graus1-Mar-07 12:38 
QuestionSaving data in access database Pin
conemajstor1-Mar-07 11:22
conemajstor1-Mar-07 11:22 
QuestionImage Formats Pin
Dobromir Dimitrov1-Mar-07 11:16
Dobromir Dimitrov1-Mar-07 11:16 
AnswerRe: Image Formats Pin
Christian Graus1-Mar-07 12:35
protectorChristian Graus1-Mar-07 12:35 
AnswerRe: Image Formats Pin
Luc Pattyn1-Mar-07 12:37
sitebuilderLuc Pattyn1-Mar-07 12:37 
AnswerRe: Image Formats Pin
Hayder Marzouk1-Mar-07 22:19
Hayder Marzouk1-Mar-07 22:19 
Hi,
To reduce the memory consumption :
1- Use the jpeg format
2- Specify the compression level
3- Always dispose graphics objects, pens, images,.. and set them to null

Here some code to specify the compression level :
private static ImageCodecInfo GetEncoderInfo(String mimeType)
{
int j;
ImageCodecInfo[] encoders;
encoders = ImageCodecInfo.GetImageEncoders();
for(j = 0; j < encoders.Length; ++j)
{
if(encoders[j].MimeType == mimeType)
return encoders[j];
}
return null;
}
private void SaveJPGWithCompressionSetting( Image image, string szFileName, long lCompression )
{
EncoderParameters eps = new EncoderParameters(1);
eps.Param[0] = new EncoderParameter( Encoder.Quality, lCompression );
ImageCodecInfo ici = GetEncoderInfo("image/jpeg");
image.Save( szFileName, ici, eps );
}

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.