Platforms to show: All Mac Windows Linux Cross-Platform

Back to ImageCaptureMBS class.

ImageCaptureMBS.DeviceList 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
Returns the object with the device list.
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

Returns nil on any error.
Lasterror is set.

Some examples using this method:

ImageCaptureMBS.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.
Example
dim m as new ImageCaptureMBS
dim flags as Integer = ImageCaptureObjectMBS.kICAAllowMultipleImages + ImageCaptureObjectMBS.kICADownloadAndReturnPathArray

// do the import and allow all file types
dim files(-1) as string = m.ImportImage(flags)

for each path as string in files
// show path
MsgBox path

// open that picture file in preview
dim f as FolderItem = GetFolderItem(path, FolderItem.PathTypeShell)
f.Launch
next

Use this method to allow the user to work a camera or a scanner.

The behavior:
(a) if no device is connected, a panel saying that there's no device connected is displayed,
(b) if a single device is connected, an appropriate user interface to access that device will be displayed,
(c) if several devices are connected, a device selector panel will be displayed.

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:

ImageCaptureMBS.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.
Example
dim m as new ImageCaptureMBS
dim flags as Integer = ImageCaptureObjectMBS.kICAAllowMultipleImages + ImageCaptureObjectMBS.kICADownloadAndReturnPathArray

// the file types we accept:
dim types(-1) as string

types.Append "tif"
types.Append "tiff"
types.Append "jpg"
types.Append "png"

dim files(-1) as string = m.ImportImage(flags, types)

for each path as string in files
// show path
MsgBox path

// open that picture file in preview
dim f as FolderItem = GetFolderItem(path, FolderItem.PathTypeShell)
f.Launch
next

Use this method to allow the user to work a camera or a scanner.

The behavior:
(a) if no device is connected, a panel saying that there's no device connected is displayed,
(b) if a single device is connected, an appropriate user interface to access that device will be displayed,
(c) if several devices are connected, a device selector panel will be displayed.

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:

ImageCaptureMBS.LoadDeviceModule(params 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
Loads a device module.

Typically, connecting a FireWire or an USB device will automatically load an appropriate device module. This API is needed only for loading a device module manually for devices that do not use a hot-plug interface, such as Bluetooth, SCSI, or TCP/IP.

Legal Key-Value pairs for populating paramDictionary:

KeyValueComment
kICADeviceModulePathKeyStringPath to the device module bundle that needs to be launched.
kICATransportTypeKeyStringShould be one of the six predifined transport types.
kICABluetoothAddressKeyStringBluetooth device address string formatted as "00-11-22-33-44-55".
kICAUSBLocationIDKeyNumber (integer)32 bit USB location ID.
kICAFireWireGUIDKeyNumber (Int64)64 bit FireWire GUID.
kICAIOServicePathKeyStringIO service path to the device obtained from the IO registry.
kICAIPAddressKeyStringIP address of the device. This can be a host address ("camera.apple.com"), ipv4 address ('192.168.123.10") or ipv6 address ("3ff3:0000:0000:0000:0123:4567:89ab:cdef")
kICAIPPortKeyNumber (integer)IP port number of the device.
kICAIPNameKeyStringHuman readable device name.
kICAIPGUIDKeyString16 byte GUID string of the device formatted as "01234567-89ab-cdef-0123-456789abcdef".
kICATWAINDSPathKeyStringPath to TWAIN DS bundle.

Lasterror is set.

ImageCaptureMBS.RegisterForEventNotification(objectOfInterest as ImageCaptureObjectMBS, eventsOfInterest() as string, options 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
Register with Image Capture framework to receive notification about events of interest.

Some examples using this method:

ImageCaptureMBS.SendNotification(notificationDictionary as dictionary) 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
Sends notification.

Returns the reply code.
Lasterror is set.

ImageCaptureMBS.SendNotificationAndWaitForReply(notificationDictionary as dictionary) 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
Sends notification and wait for reply.

Returns the reply code.
Lasterror is set.

ImageCaptureMBS.ShowDeviceBrowser

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS MacOSX Plugin 10.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Displays a device browser user interface from any Image Capture client application.

The device browser user interface allows the user to do the following:

  • enable and disable sharing of locally connected cameras and scanners.
  • connect to or disconnect from cameras and scanners shared by other computers.
  • configure WiFi capable cameras for use over the WiFi network.

Lasterror is set.

ImageCaptureMBS.UnloadDeviceModule(deviceObject 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
Unloads a device module.

The device module providing this object will be unloaded, if this is the last device object provided by the device module.
Lasterror is set.

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


The biggest plugin in space...