Sample Twain Delphi

Example requests & Code samples for GdPicture Toolkits.
Post Reply
zanona
Posts: 2
Joined: Tue Sep 25, 2012 12:27 pm

Sample Twain Delphi

Post by zanona » Tue Sep 25, 2012 12:33 pm

Hello, is there any example of using the Delphi component that allows communicate with scanner, which can set brightness, contrast and the like ... (Twain)?

Thanks

Zanona

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: Sample Twain Delphi

Post by Cedric » Thu Sep 27, 2012 11:28 am

Hello zanona,

Right now we don't have any but we'll come back to you with something.
We are under heavy workload for the time being so it may take few days, thanks for your patience.

Best regards,
Cedric
GdPicture Team

zanona
Posts: 2
Joined: Tue Sep 25, 2012 12:27 pm

Re: Sample Twain Delphi

Post by zanona » Thu Sep 27, 2012 6:57 pm

Have any prediction? Must define which component!

User avatar
Loïc
Site Admin
Posts: 5713
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Sample Twain Delphi

Post by Loïc » Mon Oct 01, 2012 1:51 pm

Hello,

Sorry for the delay. Here a simple snippet, le me know if you need something more particular.

Code: Select all

procedure TForm1.Button6Click(Sender: TObject);
var
   GdPictureImaging1: _GdPictureImaging;
   ImageID: Integer;

begin
    GdPictureImaging1 := CreateComObject(CLASS_GdPictureImaging) as _GdPictureImaging;
    GdPictureImaging1.TwainSelectSource_2(handle);
    if GdPictureImaging1.TwainOpenDefaultSource_2(handle) then
    begin
       GdPictureImaging1.TwainSetBrightness(500);
       GdPictureImaging1.TwainSetContrast(500);
       ImageID := GdPictureImaging1.TwainAcquireToGdPictureImage(handle);
       if ImageID <> 0 then
       begin
          GdPictureImaging1.SaveAsPDF(ImageId, 'c:\test.pdf', False, 'title', 'author', 'subject', 'keywords', 'creator');
          GdPictureImaging1.ReleaseGdPictureImage(ImageID);
       end;
    end;

    GdPictureImaging1.Dispose();
    GdPictureImaging1 := nil;
end;
Regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest