CURL.GetResultAsGIF
-------------------

Returns the result of the transaction as GIF image.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.GetResultAsGIF"; curl { ; FileName } ) 

**MBS**( **"CURL.GetResultAsGIF";** /\* Returns the result of the transaction as GIF image. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$FileName**) /\* Optional; The desired file name.e.g. test.gif \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| FileName | The desired file name. | test.gif | Optional |

### Result

The result value which you can assign to a container field.

### Description

Returns the result of the transaction as GIF image.  
Make sure the data is a GIF. The plugin does not verify whether result is a GIF file. But if it is one, it sets size properties so FileMaker can preview it.  
Version 5.2 and later can use the filename from URL if you don't provide one yourself.  
  
See also [CURL.GetResultAsContainer](CURLGetResultAsContainer.md).  
### Examples

Load GIF image from URL:

 # start new transfer   
Set Variable \[$curl ; Value:MBS ("[CURL.New](CURLNew.md)")\]  
\# set URL   
Set Variable \[$r ; Value:MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "https://monkeybreadsoftware.com/filemaker/images/dynapdf.gif")\]  
\# run transfer   
Set Variable \[$ErrorCode ; Value:MBS ("[CURL.Perform](CURLPerform.md)"; $curl )\]  
\# get result as GIF and store in field:   
Set Variable \[$Result ; Value:MBS ( "CURL.GetResultAsGIF"; $curl )\]  
Set Field \[test::MyContainerField ; $Result \]  
\# get debug messages:   
Set Variable \[$DebugMessages ; Value:MBS ( "[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; $curl )\]  
\# cleanup   
Set Variable \[$r ; Value:MBS ("[CURL.Release](CURLRelease.md)"; $curl )\]  
### See also

- [CURL.GetResultAsContainer](CURLGetResultAsContainer.md)
- [CURL.GetResultAsData](CURLGetResultAsData.md)
- [CURL.GetResultAsEmail](CURLGetResultAsEmail.md)
- [CURL.GetResultAsJPEG](CURLGetResultAsJPEG.md)
- [CURL.GetResultAsMime](CURLGetResultAsMime.md)
- [CURL.GetResultAsPDF](CURLGetResultAsPDF.md)
- [CURL.GetResultAsPNG](CURLGetResultAsPNG.md)
- [CURL.New](CURLNew.md)
- [CURL.Release](CURLRelease.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)

### Release notes

- **Version 15.1**
    - Improved [CURL.GetResultAsGIF](https://www.mbsplugins.eu/CURLGetResultAsGIF.shtml), [CURL.GetResultAsJPEG](https://www.mbsplugins.eu/CURLGetResultAsJPEG.shtml), [CURL.GetResultAsPDF](https://www.mbsplugins.eu/CURLGetResultAsPDF.shtml) and [CURL.GetResultAsPNG](https://www.mbsplugins.eu/CURLGetResultAsPNG.shtml) to return empty if the data is not the expected type.

### Blog Entries

- [MBS FileMaker Plugin, version 15.1pr1](https://www.mbsplugins.de/archive/2025-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.1pr8](https://www.mbsplugins.de/archive/2013-01-21/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 19th April 2020

  
[CURL.GetResultAsEmail](CURLGetResultAsEmail.md) - [CURL.GetResultAsJPEG](CURLGetResultAsJPEG.md)

[HTML Version](CURLGetResultAsGIF.shtml)