ImagePicker.SetOverlayImage
---------------------------

Installs an overlay image to the picker.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImagePicker](component_ImagePicker.md) | [8.3](newinversion83.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "ImagePicker.SetOverlayImage"; Image ) 

**MBS**( **"ImagePicker.SetOverlayImage";** /\* Installs an overlay image to the picker. \*/  
**$Image**) /\* The new overlay image.  
Proportional stretched to screen size.  
But you can use different images for different devices for best results. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Image | The new overlay image.   Proportional stretched to screen size.   But you can use different images for different devices for best results. |  |

### Result

Returns OK or error.

### Description

Installs an overlay image to the picker.  
This can be used to show additional framing rectangle or instructions to the user.  
The overlay is scaled and cropped to the screen maintaining the aspect ratio, so you best use a square picture to work in landscape and portrait.  
### Examples

Show image picker with overlay:

 Set Variable \[ $r ; Value: MBS ( "[ImagePicker.New](ImagePickerNew.md)" ) \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.SetCameraCaptureMode](ImagePickerSetCameraCaptureMode.md)"; "Photo" ) \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.SetShowsCameraControls](ImagePickerSetShowsCameraControls.md)"; 1 ) \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.SetSourceType](ImagePickerSetSourceType.md)"; "Camera") \]   
Set Variable \[ $r ; Value: MBS ( "ImagePicker.SetOverlayImage"; PlaceHolder::Container ) \]   
Set Variable \[ $r ; Value: MBS ( "[ImagePicker.Present](ImagePickerPresent.md)" ) \]  
### See also

- [ImagePicker.New](ImagePickerNew.md)
- [ImagePicker.Present](ImagePickerPresent.md)
- [ImagePicker.SetCameraCaptureMode](ImagePickerSetCameraCaptureMode.md)
- [ImagePicker.SetShowsCameraControls](ImagePickerSetShowsCameraControls.md)
- [ImagePicker.SetSourceType](ImagePickerSetSourceType.md)

### Release notes

- **Version 10.2**
    - Fixed [ImagePicker.SetOverlayImage](https://www.mbsplugins.eu/ImagePickerSetOverlayImage.shtml) to have overlay work properly when rotating the device.
- **Version 8.3**
    - Added [ImagePicker.ClearOverlay](http://www.mbsplugins.eu/ImagePickerClearOverlay.shtml) and [ImagePicker.SetOverlayImage](http://www.mbsplugins.eu/ImagePickerSetOverlayImage.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.2pr8](https://www.mbsplugins.de/archive/2020-05-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.3pr1](https://www.mbsplugins.de/archive/2018-06-04/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [Overlay image for Image Picker](https://www.mbsplugins.de/archive/2018-05-25/Overlay_image_for_Image_Picker/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 25th May 2018 , last changed 7th May 2020

  
[ImagePicker.SetMediaTypes](ImagePickerSetMediaTypes.md) - [ImagePicker.SetScript](ImagePickerSetScript.md)

[HTML Version](ImagePickerSetOverlayImage.shtml)