OCR.SetImageFile
----------------

Loads a picture from file directly.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [OCR](component_OCR.md) | [11.3](newinversion113.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "OCR.SetImageFile"; Path ) 

**MBS**( **"OCR.SetImageFile";** /\* Loads a picture from file directly. \*/  
**$Path**) /\* The native file path to the image file.e.g. "/Users/cs/Desktop/test.jpg" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native file path to the image file. | "/Users/cs/Desktop/test.jpg" |

### Result

Returns OK or error.

### Description

Loads a picture from file directly.  
Optionally you can define area of interest with [OCR.SetRectangle](OCRSetRectangle.md) function.  
### Examples

Load image from file and define area:

 Set Variable \[ $r ; Value: MBS ( "OCR.SetImageFile"; "/Users/cs/Desktop/phototest.tif") \]   
Set Variable \[ $r ; Value: MBS ( "[OCR.SetRectangle](OCRSetRectangle.md)"; 0; 0; 1000; 400) \]  
### See also

- [OCR.RenderPDF](OCRRenderPDF.md)
- [OCR.SetImage](OCRSetImage.md)
- [OCR.SetRectangle](OCRSetRectangle.md)

### Release notes

- **Version 11.3**
    - Added [OCR.SetImageContainer](https://www.mbsplugins.eu/OCRSetImageContainer.shtml) and [OCR.SetImageFile](https://www.mbsplugins.eu/OCRSetImageFile.shtml) functions to directly feed image files (and containers).

### Example Databases

- [OCR/OCR](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OCR/OCR.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin 16.1 News](https://www.mbsplugins.de/archive/2026-03-31/MBS_FileMaker_Plugin_161_News/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 11.3](https://www.mbsplugins.de/archive/2021-07-27/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [Introducing Tesseract 4 to FileMaker](https://www.mbsplugins.de/archive/2021-06-29/Introducing_Tesseract_4_to_Fil/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.3pr4](https://www.mbsplugins.de/archive/2021-06-22/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th June 2021 , last changed 15th July 2021

  
[OCR.SetImageContainer](OCRSetImageContainer.md) - [OCR.SetPageSegMode](OCRSetPageSegMode.md)

[HTML Version](OCRSetImageFile.shtml)