DragDrop.GetPicture
-------------------

Queries picture from drag and drop action.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DragDrop](component_DragDrop.md) | [2.4](newinversion24.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "DragDrop.GetPicture"; droparea { ; ImageType; FileName; Index } ) 

**MBS**( **"DragDrop.GetPicture";** /\* Queries picture from drag and drop action. \*/  
**$droparea**; /\* The reference ID for this drop area.e.g. $dropHandle \*/   
**$ImageType**; /\* Optional; The type of image to return.   
Either JPEG, PNG, GIF or BMP. Default is JPEG.e.g. "JPEG" \*/   
**$FileName**; /\* Optional; The filename to use for the picture.   
Default is "image" with the extension matching the image type.e.g. "test.jpg" \*/   
**$Index**) /\* Optional; Index for the file path. Index goes from 0 to [DragDrop.GetPathCount](DragDropGetPathCount.md)-1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| droparea | The reference ID for this drop area. | $dropHandle |  |
| ImageType | The type of image to return.    Either JPEG, PNG, GIF or BMP. Default is JPEG. | "JPEG" | Optional |
| FileName | The filename to use for the picture.    Default is "image" with the extension matching the image type. | "test.jpg" | Optional |
| Index | Index for the file path. Index goes from 0 to [DragDrop.GetPathCount](DragDropGetPathCount.md)-1. | 0 | Optional |

### Result

Returns container value with picture.

### Description

Queries picture from drag and drop action.   
Call this function in the drag action script. This can be a direct picture drag or a file drag where we load the picture file.  
  
Added Windows support for version 10.3 to get JPEG, PNG and GIF. The type depends on content, so image type and index parameters are ignored there.  
### Examples

Queries picture as PNG

 MBS ( "DragDrop.GetPicture"; $droparea ; "PNG"; "myfile.png" )  
### See also

- [DragDrop.GetPath](DragDropGetPath.md)
- [DragDrop.GetPathCount](DragDropGetPathCount.md)
- [DragDrop.GetVisible](DragDropGetVisible.md)
- [DragDrop.GetWidth](DragDropGetWidth.md)

### Release notes

- **Version 10.3**
    - Added [DragDrop.GetPicture](https://www.mbsplugins.eu/DragDropGetPicture.shtml) for Windows to get PNG, JPEG and GIF from drop.

### Example Databases

- [Drag and Drop/DragTest](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/DragTest.shtml#3ScriptAnchor_)
- [Drag and Drop/for Mac/DragTest Image](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/for%20Mac/DragTest%20Image.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.3pr3](https://www.mbsplugins.de/archive/2020-06-12/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2020, Seite 38](https://filemaker-magazin.de/neuigkeit/4089-Appetithappen-FMM_202002)

This function checks for a license.

Created 18th August 2014 , last changed 22nd September 2021

  
[DragDrop.GetPathList](DragDropGetPathList.md) - [DragDrop.GetRTF](DragDropGetRTF.md)

[HTML Version](DragDropGetPicture.shtml)