You are not logged in.
Pages: 1
Hi folks,
I am trying to convert a scanned image to a TIFF image. I post the entire code in stackoverflow.
http://stackoverflow.com/questions/6615 … ing-delphi
Could you give me some insights showing me what did I miss?
Thanks in advance,
Josir Gomes
Offline
I've answered directly in SO.
Could you try the latest version and give some feedback?
http://synopse.info/fossil/info/58a0e22c54
Offline
Hi Ab, I saw your post in SO. Thanks a lot.
I download the latest version and now it saves correctly in TIFF. But the compression is not working.
It always save in LZW. Here is the code:
procedure TForm1.TwainTwainAcquire(Sender: TObject; const Index: Integer;
Image: TBitmap; var Cancel: Boolean);
begin
Inc( Counter );
Current := Counter;
{ Force the image to be Monochrome }
Image.Monochrome := true;
{ ImageHolder is a TImage component attached on Form }
ImageHolder.Picture.Assign( Image );
SynGDIPlus.SaveAs(Image, format('c:\temp\opcao3%d.tif',[ Counter ]), gptTIF, ord(evCompressionCCITT4) );
end;
Do you have any tip on how to save using the correct compression?
PS: If you need it, I can send the whole project because I intend to distribute all source code freely.
You can also use this little project as an example for your component.
Offline
Pages: 1