Hi,
I've already tried with the two parameters:
im1->SaveAs(strImageFile, im1->ImageAttributes);
But I keep getting the same error.
In fact I've gotten this code in c# from another company and I'm sure it has worked, but
now at the moment I keep having the same error all the time on the same line.
In fact this is wath I'm doing with the component:
All the lines pass except the im1->saveas....
hDIB = imtwain->ScanPage(
false);
while ((hDIB != 0) && (i < 1000))
{
im1->hDIB = hDIB;
im1->Refresh();
im1->Overwrite = IMActX8::enumOverwrite::Yes;
if (im1->ImageColors == 2)
{
im1->Compression = IMActX8::enumCompression::Group4;
}
else
{
im1->Compression = IMActX8::enumCompression::LZW;
}
String^ strImageFile = g_strOcrTempPath +
"\\" + System::Guid::NewGuid().ToString("N") + ".tiff";
try
{
im1->SaveAs(strImageFile, im1->ImageAttributes);
}
catch(COMException^ e)
{
Trace::WriteLine(e->StackTrace);
Trace::WriteLine(e->HelpLink);
Trace::WriteLine(e->Source);
Trace::WriteLine(e->Message);
Trace::WriteLine(e->ErrorCode);
}
sImageFiles->Add(strImageFile);
i+=1;
hDIB = imtwain->ScanPage(false);
}