ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView.MIO.Acquire
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

izaque

Brazil
95 Posts

Posted - May 11 2012 :  09:31:13  Show Profile  Reply
When I use the command "if (ImageEnMView.MIO.Acquire) then" if an error occurs during scanning, is to retrieve the scanned pages? Why did he "ImageEnMView.ImageCount = 1"?

izaque

Brazil
95 Posts

Posted - May 11 2012 :  13:44:17  Show Profile  Reply
Hello xequte, only to complement the occurrence above, this only occurs in the "TWAIN". In the WIA interface, even if error, it keeps the pages scanned so far. I would like to work the same way!
Go to Top of Page

fab

1310 Posts

Posted - May 12 2012 :  03:19:07  Show Profile  Reply
Even with Twain you should have all pages actually acquired, excluded, of course, what caused the error. Anyway let me do some tests.
Go to Top of Page

izaque

Brazil
95 Posts

Posted - May 12 2012 :  14:15:55  Show Profile  Reply
Fabrizio In my tests, I'm using the latest version 4.1.0 with the Kodak i1220 scanner, delphi 7, Win7 64B, 4GB Memory and Core i5. When I'm scanning the hopper, secure the sheet so that the error occurs, simulating what happens in a client company. In WIA works, returning the pages scanned so far, but the TWAIN does not work.
Go to Top of Page

fab

1310 Posts

Posted - May 14 2012 :  00:50:34  Show Profile  Reply
I just sent to your private email an ImageEn testing version, that should enhance this behavior.
Anyway I experienced this (I don't if this is i1220 specific): failure page is always sent. Not always previous pages are sent. Of course ImageEn gets what the twain driver sends.
Go to Top of Page

izaque

Brazil
95 Posts

Posted - May 14 2012 :  08:34:58  Show Profile  Reply
Fabrizio, I auditioned at the Kodak i1320 and the same error occurs. Get the latest scanner error, it returns me the following: "General failure. Unload Source immediately."
And as I said, it returns me a scanned page in black and white, and the remaining pages never comes. Only I have the Kodak i1220 and i1320 models, I would like if possible, you apply some tests in the same way you did before, only this time with a manufacturer other than Kodak.
Go to Top of Page

xequte

39109 Posts

Posted - Jun 04 2012 :  21:26:24  Show Profile  Reply
Hi

Can you give me the acquisition code that you are using?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Jun 05 2012 :  04:44:22  Show Profile  Reply
if (iemvImagensScanner.MIO.Acquire) then
begin
CursorVelho := Screen.Cursor;
Screen.Cursor := crHourGlass;
try
iemvImagensScanner.SelectedImage := 0;
if (rbPretoBranco.Checked) then
begin
iemvImagensScanner.MIO.Params[0].BitsPerSample := 1;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 1;
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_G4FAX;
iemvImagensScanner.MIO.Params[0].DpiY := 300;
iemvImagensScanner.MIO.Params[0].DpiX := 300;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end
else if(rbEscalaCinza.Checked) then
begin
iemvImagensScanner.MIO.Params[0].BitsPerSample := 8;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 3;
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_JPEG;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGColorSpace := ioJPEG_GRAYLEV;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGQuality := iQualidadeJpeg;
iemvImagensScanner.MIO.Params[0].DpiY := 300;
iemvImagensScanner.MIO.Params[0].DpiX := 300;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end
else begin
// izaque - 23/02/2012 - 8097
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_JPEG;
iemvImagensScanner.MIO.Params[0].JPEG_DCTMethod := ioJPEG_ISLOW;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGColorSpace := ioJPEG_YCbCrK; //ioJPEG_RGB
iemvImagensScanner.MIO.Params[0].BitsPerSample := 8;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 3;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGQuality := iQualidadeJpeg;
iemvImagensScanner.MIO.Params[0].DpiY := 300;
iemvImagensScanner.MIO.Params[0].DpiX := 300;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end;

iemvImagensScanner.Update;
iemvImagensScanner.Refresh;
iemvImagensScanner.MIO.Update;

if (bUtilizaDigMultiTiff) then
begin
Application.ProcessMessages;

while (iemvImagensScanner.ImageCount > 0) do
begin
if (rbPretoBranco.Checked) then
begin
iemvImagensScanner.MIO.Params[0].BitsPerSample := 1;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 1;
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_G4FAX;
iemvImagensScanner.MIO.Params[0].DpiY := 300;
iemvImagensScanner.MIO.Params[0].DpiX := 300;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end
else if(rbEscalaCinza.Checked) then
begin
iemvImagensScanner.MIO.Params[0].BitsPerSample := 8;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 3;
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_JPEG;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGColorSpace := ioJPEG_GRAYLEV;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGQuality := iQualidadeJpeg;
iemvImagensScanner.MIO.Params[0].DpiY := 300;
iemvImagensScanner.MIO.Params[0].DpiX := 300;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end
else begin
iemvImagensScanner.MIO.Params[0].TIFF_Compression := ioTIFF_JPEG;
iemvImagensScanner.MIO.Params[0].JPEG_DCTMethod := ioJPEG_ISLOW;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGColorSpace := ioJPEG_YCbCrK; //ioJPEG_RGB
iemvImagensScanner.MIO.Params[0].BitsPerSample := 8;
iemvImagensScanner.MIO.Params[0].SamplesPerPixel := 3;
iemvImagensScanner.MIO.Params[0].TIFF_JPEGQuality := iQualidadeJpeg;
iemvImagensScanner.MIO.DuplicateCompressionInfo;
end;

iPaginaScanneada := iPaginaScanneada + 1;
sArquivoDestino := NomeImagemScanner(iPagina + iPaginaScanneada);
{
iemvImagensScanner.EnableMultiSelect := True;
iemvImagensScanner.MultiSelecting := True;
iemvImagensScanner.SelectedImage := 0;
iemvImagensScanner.MultiSelecting := False;
iemvImagensScanner.MIO.SaveToFileTIFF(sArquivoDestino, True);
}

iemvImagensScanner.GetImageToFile(0, sArquivoDestino);

iemvImagensScanner.DeleteImage(0);
Application.ProcessMessages;
end;
end
else
begin
iemvImagensScanner.MIO.SaveToFile(sArquivoOrigem);

Application.ProcessMessages;

for iContador := 0 to iemvImagensScanner.ImageCount - 1 do
begin
iPaginaScanneada := iPaginaScanneada + 1;
sArquivoDestino := NomeImagemScanner(iPagina + iPaginaScanneada);
ExtractTIFFImageFile(sArquivoOrigem, sArquivoDestino, iContador);
Application.ProcessMessages;
end;
end;
finally
Screen.Cursor := CursorVelho;
end;
end
else
begin
iemvImagensScanner.Update;
iemvImagensScanner.UpdateControlState;
iPaginaScanneada := iemvImagensScanner.ImageCount;
sLastErro := iemvImagensScanner.MIO.TwainParams.LastErrorStr;
Application.MessageBox(PChar('Não foi possível completar a digitalização! Você pode verificar as seguintes condições:' + #13 +
'O scanner selecionado é " ' + iemvImagensScanner.MIO.SelectedAcquireSource.Name + ' "!' + #13 +
'Clique no botão "Selecionar" e escolha outro scanner, ou verifique se o mesmo está ligado e conectado adequadamente!' + #13 +
'Se você está utilizando o alimentador automático, verifique se os documentos estão colocados adequadamente no alimentador!' + #13 +
'Você pode também ligar e desligar o scanner para tentar solucionar o problema, ou até mesmo reiniciar a máquina!' + #13 +
'Uma outra possível solução seria a atualização dos Drivers do scanner, disponibilizados pelo fabricante!' + #13 +
'Mensagem técnica de retorno: ' + sLastErro), 'Erro.', MB_ICONWARNING);
end;
Go to Top of Page

fab

1310 Posts

Posted - Jun 06 2012 :  10:52:35  Show Profile  Reply
quote:
And as I said, it returns me a scanned page in black and white, and the remaining pages never comes. Only I have the Kodak i1220 and i1320 models, I would like if possible, you apply some tests in the same way you did before, only this time with a manufacturer other than Kodak.


I have the same device and I can replicate this behavior. As already told this device stops sending data of already acquired pages when an error occurs.
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Jun 06 2012 :  11:23:52  Show Profile  Reply
So this is a kodak scanner device problem?
What about the question of the topic "http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=498" for Duplex scanning in "TWAIN" I only returns a page with the verse and the other scanned the totally black?
It is also a problem of kodak scanner device?
Go to Top of Page

fab

1310 Posts

Posted - Jun 07 2012 :  23:58:13  Show Profile  Reply
Just replied to http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=498
Go to Top of Page

izaque

Brazil
95 Posts

Posted - Jun 08 2012 :  05:03:59  Show Profile  Reply
Ok Fabrízio, thank you!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: