Difference between revisions of "PascalSane"

From Lazarus wiki
Jump to navigationJump to search
Line 31: Line 31:
  
 
=== Documentation ===
 
=== Documentation ===
[http://www.sane-project.org/html/ Documentation] for the Sane API covers all the functions provided by the bindings. The source code for [http://www.sane-project.org/man/scanimage.1.html scanimage] and other simple scanning applications can also be used for guidance.
+
[http://www.sane-project.org/html/ Documentation] for the Sane API covers all the functions provided by the bindings. The C source code for [http://www.sane-project.org/man/scanimage.1.html scanimage] and other simple scanning applications are recommended for guidance.
  
 
=== How to include PascalSane in a Lazarus application ===
 
=== How to include PascalSane in a Lazarus application ===

Revision as of 22:53, 24 November 2008

About

PascalSane provides pascal bindings for the libsane library, enabling Lazarus and FreePascal applications to access scanners under Linux.

Principal operations :

  • list available scanners
  • list options for a specified scanner
  • set options for a scanner
  • capture scanner input in PNM format

The download contains the libsane bindings and a unit saneutils.pas which provides some simple functions for manipulating scanner data. It also contains a demonstration Lazarus application, which contains examples of operations that can be performed using libsane.

Author

Malcolm Poole <mgpoole@users.sourceforge.net>

License

The libsane headers are in the public domain. The demo application is licensed under the GPL

Download

The latest stable release can be found at Lazarus-CCR on SourceForge.

Change Log

  • Version 0.1 19 November 2008

Dependencies / System Requirements

  • Linux
  • libsane

Issues: functions SANE_OPTION_IS_ACTIVE and SANE_OPTION_IS_SETTABLE have not been tested and are unproven

Documentation

Documentation for the Sane API covers all the functions provided by the bindings. The C source code for scanimage and other simple scanning applications are recommended for guidance.

How to include PascalSane in a Lazarus application

  • add 'sane' to the uses statement
  • in the Project Options dialog, add the path to sane.pas in the Other Unit Files section.

The PascalSane Example Application

  • Open pascalsanedemo.lpi
  • set path to sane.pas in Project Options dialog
  • compile
  • run