ImagePlayground.Image
---------------------

Queries the last image generated.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImagePlayground](component_ImagePlayground.md) | [15.0](newinversion150.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "ImagePlayground.Image" { ; ImageType; FileName } ) 

**MBS**( **"ImagePlayground.Image";** /\* Queries the last image generated. \*/  
**$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" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| 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 |

### Result

Returns container value or error.

### Description

Queries the last image generated.  
### Examples

Trigger to be called when image is available:

 Set Variable \[ $param ; Value: Get(ScriptParameter) \]  
\# Check whether we got something   
If \[ $param = "Created" \]  
 Set Variable \[ $image ; Value: MBS ("ImagePlayground.Image") \]  
 New Record/Request  
 Set Field \[ Assets::Image ; $image \]  
 Commit Records/Requests \[ With dialog: Off \]  
End If  
\#   
\# cleanup memory   
Set Variable \[ $r ; Value: MBS ("[ImagePlayground.Release](ImagePlaygroundRelease.md)") \]  
### See also

- [ImagePlayground.Create](ImagePlaygroundCreate.md)
- [ImagePlayground.ImagePath](ImagePlaygroundImagePath.md)
- [ImagePlayground.Present](ImagePlaygroundPresent.md)
- [ImagePlayground.Release](ImagePlaygroundRelease.md)

### Example Databases

- [Mac only/ImagePlayground](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/ImagePlayground.shtml#2ScriptAnchor_)

### Blog Entries

- [Use Image Playground in FileMaker](https://www.mbsplugins.de/archive/2024-12-18/Use_Image_Playground_in_FileMa/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th December 2024 , last changed 15th December 2024

  
[ImagePlayground.GetSourceImage](ImagePlaygroundGetSourceImage.md) - [ImagePlayground.ImagePath](ImagePlaygroundImagePath.md)

[HTML Version](ImagePlaygroundImage.shtml)