Click here to Skip to main content
15,887,383 members
Home / Discussions / C#
   

C#

 
QuestionMVC Implementation in C# Pin
Sadaqat Bukhari7-Oct-08 2:05
Sadaqat Bukhari7-Oct-08 2:05 
AnswerRe: MVC Implementation in C# Pin
leppie7-Oct-08 2:18
leppie7-Oct-08 2:18 
GeneralRe: MVC Implementation in C# Pin
User 66587-Oct-08 3:09
User 66587-Oct-08 3:09 
GeneralRe: MVC Implementation in C# Pin
Ashfield7-Oct-08 3:43
Ashfield7-Oct-08 3:43 
QuestionCrystal report Error? Pin
murali_utr7-Oct-08 1:39
murali_utr7-Oct-08 1:39 
AnswerRe: Crystal report Error? Pin
Wendelius7-Oct-08 8:15
mentorWendelius7-Oct-08 8:15 
GeneralRe: Crystal report Error? Pin
murali_utr7-Oct-08 21:23
murali_utr7-Oct-08 21:23 
QuestionProblem of A generic error occurred in GDI+. Pin
MallikarjunaGupta7-Oct-08 1:27
MallikarjunaGupta7-Oct-08 1:27 
public static int GenerateImage(String FilePath, int ImageW, int ImageH, string sToFolder)
{
try
{
int iResult;
if (File.Exists(sToFolder + System.IO.Path.GetFileName(FilePath)))
{
iResult = 0; // File allaready exists to destination path

}
else
{
int ThumbWidth = ImageW;
int ThumbHeight = ImageH;

Bitmap origImg = new Bitmap(FilePath);

// HttpContext.Current.Server.MapPath("filename");

//Declare our New FileName to save the thumbnail as
String newSavePath = sToFolder + System.IO.Path.GetFileName(FilePath);

Bitmap dstImg = new Bitmap(ThumbWidth, ThumbHeight);
dstImg.SetResolution(72, 72);
Graphics g = Graphics.FromImage(dstImg);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;

// Resize the original to the thumb width and height
g.DrawImage(origImg, 0, 0, ThumbWidth, ThumbHeight);
g.Dispose();

EncoderParameters encoderParameters = new EncoderParameters(1);
encoderParameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Compression, 100); // 80% Compression
dstImg.Save(newSavePath, ImageCodecInfo.GetImageEncoders()[1], encoderParameters); // jpg format
dstImg.Dispose();
origImg.Dispose();
iResult = 1;
}
return iResult;

}
catch (Exception ex)
{
throw (ex);
}
}

I AM USING THIS FUNTION WHEN i run the local it is working fine if i run on server it is giving error any body can help me........ASAP...........
AnswerRe: Problem of A generic error occurred in GDI+. Pin
DaveyM697-Oct-08 1:46
professionalDaveyM697-Oct-08 1:46 
AnswerRe: Problem of A generic error occurred in GDI+. Pin
leppie7-Oct-08 2:21
leppie7-Oct-08 2:21 
AnswerRe: Problem of A generic error occurred in GDI+. Pin
Mark Salsbery7-Oct-08 3:58
Mark Salsbery7-Oct-08 3:58 
QuestionFailure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
DJ2457-Oct-08 1:20
DJ2457-Oct-08 1:20 
AnswerRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
Giorgi Dalakishvili7-Oct-08 1:32
mentorGiorgi Dalakishvili7-Oct-08 1:32 
GeneralRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
DJ2457-Oct-08 1:36
DJ2457-Oct-08 1:36 
GeneralRe: Failure Of Exe- Error: Cannot load Interop.Excel.1.5.0.0.dll file Pin
Giorgi Dalakishvili7-Oct-08 1:44
mentorGiorgi Dalakishvili7-Oct-08 1:44 
QuestionCopy treeNodeCollection problem Pin
sepel7-Oct-08 0:11
sepel7-Oct-08 0:11 
AnswerRe: Copy treeNodeCollection problem Pin
Eduard Keilholz7-Oct-08 0:27
Eduard Keilholz7-Oct-08 0:27 
AnswerRe: Copy treeNodeCollection problem Pin
DaveyM697-Oct-08 1:09
professionalDaveyM697-Oct-08 1:09 
GeneralRe: Copy treeNodeCollection problem Pin
sepel7-Oct-08 7:30
sepel7-Oct-08 7:30 
Questionhow to monitor WCF/web services traffic? Pin
George_George6-Oct-08 23:42
George_George6-Oct-08 23:42 
AnswerRe: how to monitor WCF/web services traffic? Pin
blackjack21507-Oct-08 2:42
blackjack21507-Oct-08 2:42 
GeneralRe: how to monitor WCF/web services traffic? Pin
George_George7-Oct-08 21:41
George_George7-Oct-08 21:41 
QuestionSmart device screen resolution Pin
Scalpa6-Oct-08 22:17
Scalpa6-Oct-08 22:17 
QuestionCreate HeaderFooter object in Word using C# Pin
Harish (Developer)6-Oct-08 21:14
Harish (Developer)6-Oct-08 21:14 
AnswerRe: Create HeaderFooter object in Word using C# Pin
dan!sh 6-Oct-08 23:46
professional dan!sh 6-Oct-08 23:46 

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.