#1 Re: GDI+ » Converting scanned image to TIFF. » 2011-07-14 15:25:34

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.

#2 GDI+ » Converting scanned image to TIFF. » 2011-07-07 22:44:35

josir
Replies: 3

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

Board footer

Powered by FluxBB