Click to See Complete Forum and Search --> : Urgent help for GDI+ in VC


u_on_fire
December 24th, 2005, 02:51 AM
Linking...
gdiplus.lib(imagingguds.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe.
Creating browse info file...

I write the code for converting image to JPG with quality level and have error. I found that the error caused by
"encoderParameters.Parameter[0].Guid = EncoderQuality;"
Who can help me?

Below is the code :

bool CTmp_gdiDlg::SaveAsJPG(CString Path)
{
CPaintDC dc(this); // device context for painting
Graphics g(dc);

Bitmap b(FilePath.AllocSysString());

CLSID encoderClsid;
Status stat;
EncoderParameters encoderParameters;

// Get the CLSID of the encoder.
CString str = "image/jpeg";

CString strFileName = Path + ".jpg";
GetEncoderClsid(str.AllocSysString(), &encoderClsid);

encoderParameters.Count = 1;
encoderParameters.Parameter[0].Guid = EncoderQuality;
encoderParameters.Parameter[0].Type = EncoderParameterValueTypeLong;
encoderParameters.Parameter[0].NumberOfValues = 1;

ULONG QualityJPG;
QualityJPG=0;
// Save the image as a JPEG with quality level
encoderParameters.Parameter[0].Value = &QualityJPG;
stat = b.Save(strFileName.AllocSysString(), &encoderClsid, &encoderParameters);

if(stat == Ok)
return true;
else
return false;
}

ovidiucucu
December 28th, 2005, 02:54 AM
Take a look at Linker Tools Error LNK1103 (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK1103.asp) and Corrupt Object File (http://msdn2.microsoft.com/en-us/library/es67b02f.aspx) in MSDN.