Platforms to show: All Mac Windows Linux Cross-Platform

Back to ImageCaptureObjectMBS class.

ImageCaptureObjectMBS.CloseSession

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Close a session on a camera device.

Lasterror is set.
For a scanner device use the ScannerCloseSession.

ImageCaptureObjectMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new image capture object.

See also:

ImageCaptureObjectMBS.Constructor(handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new image capture object with the given handle.

See also:

ImageCaptureObjectMBS.CopyData(startByte as int64, requestedSize as int64) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get a copy of data associated with a file object.
Example
dim o as ImageCaptureObjectMBS // your object pointing to an image file.

dim d2 as Dictionary = o.PropertyDictionary
dim size as Integer = d2.Value(o.kICAPropertyImageSize)

dim data as string = o.CopyData(0, size)

if lenb(data)>0 then
// you got the data, now process it.
end if

startByte: Starting byte offset of the data in the file object.
requestedSize: Requested data size in bytes.

If you want to get all bytes of an object, pass startByte = 0 and requestedSize = filesize.
Lasterror is set.

ImageCaptureObjectMBS.CopyThumbnail(format as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get a thumbnail associated with an object.

This is the recommended way to get the thumbnail of an object.

Use the constants for the format: kICAThumbnailFormatJPEG, kICAThumbnailFormatTIFF or kICAThumbnailFormatPNG
Lasterror is set.

Some examples using this method:

ImageCaptureObjectMBS.DownloadFile(dir as folderitem, flags as Integer, MacType as string, MacCreator as string, angle as Double) as folderitem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Downloads a file to disk.

This API is a convenient way to download a file to disk. To receive the image data in memory use CopyObjectData.

Constants for flags:
kDeleteAfterDownload= 1Delete file after a successful download.
kCreateCustomIcon= 2Create a custom icon for Finder.
kAddMetaDataToFinderComment= 4Add basic metadata to finder comment field.
kAdjustCreationDate= 8Set creation date of the downloaded file same as the creation date for the file as reported by the device.
kSetFileTypeAndCreator= &h10Set 4-char file type and creator code.
kEmbedColorSyncProfile= &h20Embed ColorSync profile to the image if one was not already embedded.
kRotateImage= &h40Rotate the image.
kDontEmbedColorSyncProfile= &h80Do not embed ColorSync profile to the image.

Lasterror is set.

ImageCaptureObjectMBS.ImportImage(flags as Integer) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This method displays a Common User Interface panel similar to the user interface of Image Capture Application.

Use this method to allow the user to work a camera or a scanner.
The ImageCaptureObjectMBS object you use for this call, should point to a camera or scanner device.

filetypes: Optional an array of file extension strings such as "jpg", "tif", etc., that are of interest to the calling application. If no array is provided, all files are displayed.

Flag values that can be used in ImportImage:
kICAAllowMultipleImages= 1Use this constant to allow users to select multiple images in the Import Image dialog.
kICADownloadAndReturnPathArray= 2Use this constant to download the images to a temporary location and return an array of paths to the downloaded images.

Returns an array of Strings for the imported images if the kICADownloadAndReturnPathArray flag is not specified. Otherwise returns an array of Strings holding the paths of the images that are downloaded.

See also:

ImageCaptureObjectMBS.ImportImage(flags as Integer, filetypes() as string) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This method displays a Common User Interface panel similar to the user interface of Image Capture Application.

Use this method to allow the user to work a camera or a scanner.
The ImageCaptureObjectMBS object you use for this call, should point to a camera or scanner device.

filetypes: Optional an array of file extension strings such as "jpg", "tif", etc., that are of interest to the calling application. If no array is provided, all files are displayed.

Flag values that can be used in ImportImage:
kICAAllowMultipleImages= 1Use this constant to allow users to select multiple images in the Import Image dialog.
kICADownloadAndReturnPathArray= 2Use this constant to download the images to a temporary location and return an array of paths to the downloaded images.

Returns an array of Strings for the imported images if the kICADownloadAndReturnPathArray flag is not specified. Otherwise returns an array of Strings holding the paths of the images that are downloaded.

See also:

ImageCaptureObjectMBS.OpenSession(device as ImageCaptureObjectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Opens a session on a camera device.

Lasterror is set.
For a scanner device use the ScannerOpenSession method.

ImageCaptureObjectMBS.PropertyDictionary as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get a dictionary containing all the properties for an object specified.
Example
dim m as new ImageCaptureMBS
dim list as ImageCaptureObjectMBS = m.DeviceList

if List<>Nil then
// look into properties
dim dic as Dictionary = list.PropertyDictionary

// take the devices array there
if dic<>Nil and dic.HasKey(ImageCaptureObjectMBS.kICADevicesArrayKey) then
dim a(-1) as Variant = dic.Value(ImageCaptureObjectMBS.kICADevicesArrayKey)

// display device name
for each properties as Dictionary in a
MsgBox Properties.Value("ifil")
next
end if
end if

Lasterror is set.

Some examples using this method:

ImageCaptureObjectMBS.PropertyDictionaryText as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get a dictionary containing all the properties for an object specified.
Example
dim m as new ImageCaptureMBS
dim list as ImageCaptureObjectMBS = m.DeviceList

if List<>Nil then
MsgBox List.PropertyDictionaryText
end if

Lasterror is set.
This is for debugging and may be removed soon.
The format of the text is the plist file format.

ImageCaptureObjectMBS.ScannerCloseSession

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Closes a session on a scanner device.

Lasterror is set.
For a camera device use the CloseSession method.

ImageCaptureObjectMBS.ScannerGetParameters as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Query scanner parameters.

Use this method to get information about the scanner such as resolution, scanning area, etc.
Lasterror is set.

ImageCaptureObjectMBS.ScannerInitialize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initializes a scanner device.

Lasterror is set.

ImageCaptureObjectMBS.ScannerOpenSession(device as ImageCaptureObjectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Opens a session on a scanner device.

Lasterror is set.
For a camera device use the OpenSession method.

ImageCaptureObjectMBS.ScannerSetParameters(dic as dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Configures a scanner.

Use this method to specify scan parameters that will be used when a scan is initiated via ScannerStart.
Lasterror is set.

ImageCaptureObjectMBS.ScannerStart

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Starts scanning.

Use this method to start a scan based on the parameters that were specified in a previous ScannerSetParameters call.
Lasterror is set.

ImageCaptureObjectMBS.ScannerStatus as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the scanner status.

Lasterror is set.

ImageCaptureObjectMBS.SendMessageMemory(messageType as string, startByte as UInt32, data as memoryblock, dataType as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sends a message to a device object.

Use this API to send a message to a device object. All devices do not respond to all the messages defined above.

messageType: A message type. e.g., kICAMessageCameraCaptureNewImage.
startByte: Offset in dataPtr from where data access for read/write should occur.
data: The data to send.
dataType: Data type.

Lasterror is set.
Retruns the result from this message.

ImageCaptureObjectMBS.SendMessageString(messageType as string, startByte as UInt32, data as string, dataType as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sends a message to a device object.

Use this API to send a message to a device object. All devices do not respond to all the messages defined above.

messageType: A message type. e.g., kICAMessageCameraCaptureNewImage.
startByte: Offset in dataPtr from where data access for read/write should occur.
data: The data to send.
dataType: Data type.

Lasterror is set.
Retruns the result from this message.

ImageCaptureObjectMBS.UploadFile(file as folderitem, flags as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Uploads a file to a device that supports this capability.

The device choses an appropriate destination location for the uploaded image and sends a kICANotificationTypeObjectAdded notification.
Lasterror is set.

Flag values that can be used in UploadFile:
kICAUploadFileAsIsUse this constant to upload a file as is.
kICAUploadFileScaleToFitUse this constant to upload a file after scaling to fit a specified bounding rect.

The items on this page are in the following plugins: MBS MacOSX Plugin.


The biggest plugin in space...