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;
}
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;
}