Click here to Skip to main content
15,890,690 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exposing a control through a property Pin
spif200131-Mar-05 20:02
spif200131-Mar-05 20:02 
QuestionMatching visual lines in RTF with internal Lines? Pin
LongRange.Shooter31-Mar-05 8:10
LongRange.Shooter31-Mar-05 8:10 
QuestionHow to add a new user using DirectoryServices (User Logon Name) Pin
markaelkins31-Mar-05 6:09
markaelkins31-Mar-05 6:09 
GeneralDrawing a transparent labe over another control Pin
RudyBone31-Mar-05 5:29
RudyBone31-Mar-05 5:29 
GeneralRe: Drawing a transparent labe over another control Pin
Heath Stewart31-Mar-05 6:34
protectorHeath Stewart31-Mar-05 6:34 
GeneralRe: Drawing a transparent labe over another control Pin
RudyBone31-Mar-05 6:51
RudyBone31-Mar-05 6:51 
GeneralRe: Drawing a transparent labe over another control Pin
Heath Stewart31-Mar-05 8:24
protectorHeath Stewart31-Mar-05 8:24 
Generalimage Resize Pin
muslcesonvacation31-Mar-05 5:20
muslcesonvacation31-Mar-05 5:20 
Hi
I'm having an error "A generic error occurred in GDI+." with the following image resize code. can anybody help. PLZ

private void cmdStart_Click(object sender, System.EventArgs e)
{
if (( File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0))
{
//determine file name
string szFileName = System.IO.Path.GetFileName(File1.PostedFile.FileName);
Size s = new Size(75,75);
ImageResize(File1.PostedFile.FileName,s);
}
}
void ImageResize(string str_file, Size new_size)
{
try
{
System.Drawing.Image src_image = System.Drawing.Image.FromFile(str_file);
Bitmap bitmap = new Bitmap(new_size.Width, new_size.Height,src_image.PixelFormat);
Graphics new_g = Graphics.FromImage(bitmap);
new_g.SmoothingMode =System.Drawing.Drawing2D.SmoothingMode.HighQuality;
new_g.InterpolationMode =System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
new_g.DrawImage(src_image, 0, 0, bitmap.Width, bitmap.Height);
src_image.Dispose();
bitmap.Save("C:\\Inetpub\\wwwroot\\ImageConverter\\bin\\resize.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
new_g.Dispose();
bitmap.Dispose();
}
catch(Exception e)
{
string a = e.Message;
}
}

Thanks
Gary
GeneralRe: image Resize Pin
Heath Stewart31-Mar-05 5:27
protectorHeath Stewart31-Mar-05 5:27 
GeneralRe: image Resize Pin
muslcesonvacation31-Mar-05 5:31
muslcesonvacation31-Mar-05 5:31 
GeneralRe: image Resize Pin
Heath Stewart31-Mar-05 6:25
protectorHeath Stewart31-Mar-05 6:25 
GeneralRe: image Resize Pin
Heath Stewart31-Mar-05 6:23
protectorHeath Stewart31-Mar-05 6:23 
GeneralDates Pin
scotlandc31-Mar-05 5:11
scotlandc31-Mar-05 5:11 
GeneralRe: Dates Pin
techieboi31-Mar-05 5:57
techieboi31-Mar-05 5:57 
GeneralRe: Dates Pin
Heath Stewart31-Mar-05 6:19
protectorHeath Stewart31-Mar-05 6:19 
GeneralRe: Dates Pin
scotlandc4-Apr-05 0:52
scotlandc4-Apr-05 0:52 
GeneralWhidbey - beta1 - "Beta period has expired!!!" Pin
abcxyz8231-Mar-05 3:59
abcxyz8231-Mar-05 3:59 
GeneralRe: Whidbey - beta1 - "Beta period has expired!!!" Pin
Judah Gabriel Himango31-Mar-05 4:53
sponsorJudah Gabriel Himango31-Mar-05 4:53 
GeneralRe: Whidbey - beta1 - "Beta period has expired!!!" Pin
Koushik.roy@rbc.com31-Mar-05 10:33
Koushik.roy@rbc.com31-Mar-05 10:33 
GeneralQuestion on File.Copy Pin
RockRock31-Mar-05 3:42
RockRock31-Mar-05 3:42 
GeneralRe: Question on File.Copy Pin
Colin Angus Mackay31-Mar-05 4:28
Colin Angus Mackay31-Mar-05 4:28 
GeneralRe: Question on File.Copy Pin
RockRock31-Mar-05 4:35
RockRock31-Mar-05 4:35 
GeneralRe: Question on File.Copy Pin
Colin Angus Mackay31-Mar-05 4:39
Colin Angus Mackay31-Mar-05 4:39 
GeneralRe: Question on File.Copy Pin
Dave Kreskowiak31-Mar-05 5:59
mveDave Kreskowiak31-Mar-05 5:59 
GeneralEasy Translation!! Pin
Diogo Alves31-Mar-05 3:38
Diogo Alves31-Mar-05 3:38 

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.