Image handling components by
With these components you can add the ability to scan images
without writing a single line of code
TImagePlus is an enhanced replacement for the
TImage component supplied as standard with Delphi
Features
- Right click context menu
- Menu features common functions like cut copy paste open save as aspect
center stretch
- built-in dialogs for file open/save functions (with preview on Delphi
3 & higher)
- dialogs are created when needed and destroyed immediately when finished
to conserve resources
- menu is accessible as TImagePlus.Menu with menu being of the type TPopupMenu
- open/save dialog properties can be modified via the TImagePlus.DialogOptions
property
- Aspect ratio stretching of the image
Properties Methods
Events Top
TImageTwain builds on TImagePlus to add 2
new menu items for using twain compliant scanners & cameras
they are Select Source & Acquire Image
Properties Methods
Events Top
TdbImagePlus is an enhanced TdbImage which
adds the following features
- Right click context menu
- Menu features common functions like cut copy paste open save as aspect
center stretch
- built-in dialogs for file open/save functions (with preview on Delphi
3 & higher)
- dialogs are created when needed and destroyed immediately when finished
to conserve resources
- menu is accessible as TImagePlus.Menu with menu being of the type TPopupMenu
- open/save dialog properties can be modified via the TImagePlus.DialogOptions
property
- Aspect ratio stretching of the image
TdbImageTwain is the Twain compliant version
of TdbImagePlus which makes storing pictures in a database childsplay
Properties Methods
Events Top
Properties
Published
- Aspect:boolean, sets stretching which maintains correct aspect ratio
of the image, overrides stretch & center
- AutoLanguage:boolean (NLS version only) if enabled then this component
will respond to language change events and change hints, menu captions
and error messages to the currently selected language if the resource exists
for selected language
- Flip:boolean, when set the image is drawn upside down
- Mirror:boolean, when set the image is drawn as a mirror image
- DialogOptions:TDialogOptions, this property contains sub-properties
which define the properties & appearance of the open & save dialogs
- hasPreview:boolean defines whether we have a full size image preview
available from the menu
- OpenPictureDialog:TOpenDialog or Delphi 3 up TOpenPictureDialog, this
dialog will be used when opening files if assigned, if not the component
creates its own dialog with the settings from DialogOptions property, Note,
if an OpenPictureDialog is supplied then the DialogOptions property is
ignored
- SavePictureDialog:TSaveDialog or Delphi 3 up TSavePictureDialog, this
dialog will be used when saving files if assigned, works the same as OpenPictureDialog
- all other properties are as per TImage
Top
Public
- Menu:TPopupMenu, allows control of the menu used by the component,
should be used with caution
Methods
- function Acquire:integer; this method allows you to scan an image into
the control without using the popup menu
Top
Events
- OnAfterAcquire (TImageTwain/TDbImageTwain) called after image acquisition
- OnAfterLoad called after the user loads an image from disk
- OnAfterSave called after the user saves an image to disk
- OnBeforeAcquire (TImageTwain/TDbImageTwain)
- OnBeforeLoad, by setting allow to false you can prevent the user loading
an image from disk
- OnBeforeSave, by setting allow to false you can prevent the user saving
an image to disk
- OnPopup, called when the menu pops up
- OnScanError (TImageTwain/TDbImageTwain) called when there is an error
using the Acquire method, this is not called when the user scans using
the popup menu, errors in interactive mode are handled with messagebox
functions
- OnSelectSource (TImageTwain/TDbImageTwain) called in response to the
user selecting a twain source
all other events are the standard TImage Events
Top
TDialogOptions = class(TPersistent)
published
property DefaultExt:String read GetDefaultExt write SetDefaultExt;
property Filter:String read GetFilter write SetFilter stored fStoreFilter;
property InitialDir:String read GetInitialdir write SetInitialDir;
property Title:String read GetTitle write SetTitle;
property FileName:String read GetFileName write SetFileName;
property Ctl3d:boolean read fCtl3d write fCtl3d default false;
property FileEditStyle:TFileEditStyle read fFileEditStyle write fFileEditStyle
default fsedit;
property FilterIndex:Integer read fFilterIndex write fFilterIndex default
0;
property HelpContext:Integer read fHelpcontext write fHelpContext default
0;
property HistoryList:TStrings read fHistoryList write SetLines;
property Options:TOpenOptions read fOptions write fOptions default
[];
property Tag:longInt read fTag write fTag default 0;
end;
TDialogOptions is used to make the open/save dialog properties available
at design time and stored in the DFM file, these values are copied to the
default Open/Save dialogs when they are created at run time, for a full
explanation of these values look at the help file for TOpenDialog class
Top
Installation
Before installation you should backup your cmplib.dcl file
prior to installation copy the relevant language support files
to the install dir from the language support directories
Delphi 1 & 2 goto menu item Component>Install and select regimg.pas
then click ok to rebuild the library
Delphi 3 open gda3.dpk and compile then install
Delphi 4 open gda4.dpk and compile then install
Top
Credits:
Peter Ivan Dunne, Primary
developer
Hans Vandepapeliere
French & Nederlands translations of the resource files
Omer Yasar Can Nederlands
& Deutsch translation
Philippe_Descat
French Translation
The team who created EZTWAIN which is used by these components