Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Component: Twain

Functions to acquire images from scanners.

See newer WIA functions for Windows and newer ImageCapture functions for MacOS.

Version macOS Windows Linux Server iOS SDK
3.1 / 5.1 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No

Item Details
Twain.Acquire
Acquires a picture.
Mac/Win
3.1
Twain.ClearCancelScript
Clears the cancel script.
Mac/Win
3.3
Twain.ClearNotificationScript
Clears the notification script.
Mac/Win
3.3
Twain.CloseDS
Closes data source.
Mac/Win
3.1
Twain.CloseDSM
Closes data source manager.
Mac/Win
3.1
Twain.CurrentDSIdentity
Queries current data source.
Mac/Win
3.1
Twain.CurrentImage
Queries the current image from last query.
Mac/Win
3.1
Twain.DisableDS
Disables the data source.
Mac/Win
3.1
Twain.GetAutofeed
Queries whether plugin should auto feed (if feeder is enabled).
Mac/Win
3.1
Twain.GetAutomaticBorderDetection
Queries whether plugin should enable automatic border detection.
Mac/Win
3.3
Twain.GetAutomaticBrightness
Queries the Source's Auto-brightness function (if any).
Mac/Win
3.5
Twain.GetAutomaticRotate
Queries whether plugin should enable automatic rotation.
Mac/Win
3.3
Twain.GetBrightness
Queries the brightness setting to use.
Mac/Win
3.5
Twain.GetCloseAfterTransfer
Whether to close window and data source after a transfer.
Mac/Win
3.1
Twain.GetCompressionQuality
Queries the current quality setting.
Mac/Win
3.1
Twain.GetContrast
Queries which contrast value to use.
Mac/Win
3.5
Twain.GetDSIdentitiesCount
Queries number of data sources.
Mac/Win
3.1
Twain.GetDSIdentity
Queries data source with given index.
Mac/Win
3.1
Twain.GetDefaultIdentity
Queries default data source.
Mac/Win
3.1
Twain.GetDiscardBlankPages
Queries whether plugin should enable feeder.
Mac/Win
3.2
Twain.GetDuplexEnabled
Queries whether plugin should enable feeder.
Mac/Win
3.2
Twain.GetFeededEnabled
Queries whether plugin should enable feeder.
Mac/Win
3.1
Twain.GetFilePaths
Queries the list of file paths used to create files.
Mac/Win
3.1
Twain.GetFileType
Queries the current file type.
Mac/Win
3.1
Twain.GetFolderPath
Queries the folder path.
Mac/Win
3.1
Twain.GetGamma
Queries the gamma correction value for the image data.
Mac/Win
3.5
Twain.GetHighlight
Queries which value to use for highlight.
Mac/Win
3.5
Twain.GetImageCount
Queries the number of images in memory.
Mac/Win
3.1
Twain.GetOrientation
Queries current orientation.
Mac/Win
3.1
Twain.GetPaper
Queries the paper to use.
Mac/Win
5.1
Twain.GetPixelType
Queries current pixel type setting.
Mac/Win
3.1
Twain.GetResolutionX
Queries the current resolution setting for the next scan.
Mac/Win
3.1
Twain.GetResolutionY
Queries the current resolution setting for the next scan.
Mac/Win
3.1
Twain.GetShadow
Queries which value in an image should be interpreted as the darkest shadow.
Mac/Win
3.5
Twain.GetUIVisible
Queries internal state from plugin about whether a TWAIN dialog is visible currently.
Mac/Win
3.3
Twain.ImageInfo
Queries image details for last scanned image.
Mac/Win
3.1
Twain.Initialize
Initializes the Twain functions.
Mac/Win
3.1
Twain.IsDSEnabled
Whether data source is enabled.
Mac/Win
3.1
Twain.IsInitialized
Checks if Twain library has been initialized.
Mac/Win
4.2
Twain.OpenDS
Opens a data source.
Mac/Win
3.1
Twain.OpenDSM
Opens data source manager.
Mac/Win
3.1
Twain.SelectDS
Queries dialog to ask the user to select a data source.
Mac/Win
3.1
Twain.SelectDSIdentity
Sets current data source.
Mac/Win
3.1
Twain.SetAutofeed
Whether to enable auto feed when next scan starts.
Mac/Win
3.1
Twain.SetAutomaticBorderDetection
Whether to enable automatic border detection when next scan starts.
Mac/Win
3.3
Twain.SetAutomaticBrightness
Enables or disables the Source's Auto-brightness function (if any).
Mac/Win
3.5
Twain.SetAutomaticRotate
Whether to enable automatic rotation when next scan starts.
Mac/Win
3.3
Twain.SetBrightness
Sets the brightness setting to use.
Mac/Win
3.5
Twain.SetCancelScript
Sets the script to call when a dialog was shown and the user pressed Cancel button.
Mac/Win
3.3
Twain.SetCloseAfterTransfer
Whether to close window and data source after a transfer.
Mac/Win
3.1
Twain.SetCompressionQuality
Sets the compression quality for JPEG images.
Mac/Win
3.1
Twain.SetContrast
Sets which contrast value to use.
Mac/Win
3.5
Twain.SetDefaultDSIdentity
Sets default data source.
Mac/Win
3.1
Twain.SetDiscardBlankPages
Whether to have the scanner ask to discard blank pages.
Mac/Win
3.2
Twain.SetDuplexEnabled
Whether to enable duplex when next scan starts.
Mac/Win
3.2
Twain.SetFeededEnabled
Whether to enable feeder when next scan starts.
Mac/Win
3.1
Twain.SetFileType
Sets the file type to use for writing image files.
Mac/Win
3.1
Twain.SetFolderPath
Sets the folder path for storing image files.
Mac/Win
3.1
Twain.SetGamma
Sets the gamma correction value for the image data.
Mac/Win
3.5
Twain.SetHighlight
Specifies which value in an image should be interpreted as the lightest highlight.
Mac/Win
3.5
Twain.SetNotificationScript
Sets the script to call when a transfer is complete and you can query image.
Mac/Win
3.1
Twain.SetOrientation
Sets current orientation.
Mac/Win
3.1
Twain.SetPaper
Requests to use a certain paper.
Mac/Win
5.1
Twain.SetPaperSize
Requests a page size in inches.
Mac/Win
5.1
Twain.SetPixelType
Sets the pixel type requested on next Twain.Acquire command.
Mac/Win
3.1
Twain.SetResolutionX
Sets the horizontal resolution for scanning.
Mac/Win
3.1
Twain.SetResolutionY
Sets the vertical resolution for scanning.
Mac/Win
3.1
Twain.SetShadow
Specifies which value in an image should be interpreted as the darkest shadow.
Mac/Win
3.5
Twain.SupportsBW
Whether device supports black and white pixel type.
Mac/Win
3.1
Twain.SupportsGray
Whether current device supports gray pixel type.
Mac/Win
3.1
Twain.SupportsMemoryTransfer
Whether device supports memory transfers.
Mac/Win
3.1
Twain.SupportsRGB
Whether current device supports RGB pixel type.
Mac/Win
3.1
Twain.TransferImage
Transfers an image.
Mac/Win
3.1

73 functions shown.

Release notes

  • Version 14.4
  • Version 11.4
    • Fixed problem in Twain.Acquire to fail better if we can't open the data source.
  • Version 9.2
  • Version 7.2

Blog Entries

Example Databases