> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IPictureObject

> IPictureObject represents a page or region image in FlexiCapture scripts, with methods to analyze objects, check OCR suitability, and detect orientation.

## What it does

Represents the image of a page or a region.

The object implements the IPicture interface and provides access to some of its properties through the IDispatch interface.

For more details about the IPicture interface, see the corresponding article at [MSDN](https://msdn.microsoft.com/en-us/library/ms680761\(VS.85\).aspx#methods).

<Note>
  This object is not available on the Web Verification Station for checking rules locally.
</Note>

## Methods

<table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Definition</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>AnalyzePageObjects( \[optional] reserved: Object ) : <a href="/flexi-capture/appendix/scripts/i-picture-objects-info">IPictureObjectsInfo</a></p></td><td><p>Defines objects on the page and returns the parameters of the page as seen by the recognition module. Some delay in the operation is possible.</p></td></tr><tr><td><p>CalcSuitabilityForOCR(): float</p></td><td><p>Shows how suitable is an image for OCR. Possible values are from 0.0 to 1.0.</p><details><summary>Example</summary><p>This script records results of method's operation for the selected documents to a page comment by clicking a user button:</p><pre><code>foreach( IDocument doc in MainWindow\.Selection.Documents )
\{
MainWindow\.TaskWindow\.OpenDocument( doc );
foreach( IPage page in doc.Pages )
\{
IPictureObject picture = page.Picture;
       double score = (double)picture.CalcSuitabilityForOCR();
       bool verdict = (bool)picture.IsSuitableForOcr();
       page.Comment = score.ToString( "0.0000" ) + " / " + verdict.ToString();
}
}</code></pre></details></td></tr><tr><td><p>CreateEditableCopy() : <a href="/flexi-capture/appendix/scripts/ieditablepictureobject">IEditablePictureObject</a></p></td><td><p>Creates an editable copy of the image.</p></td></tr><tr><td><p>DetectPageOrientation( \[optional] language: string ) : int</p></td><td><p>Detects page orientation by the text on it. The <a href="/flexi-capture/appendix/scripts/internal-lang">internal name</a> of the language is passed as the input parameter. If the language is not specified, the language of the current locale is used. Returns the angle (in degrees) to which the page must be rotated. The following values can be returned: 0, 90, 180 and 270.</p></td></tr><tr><td><p>IsPhoto(): bool</p></td><td><p>Shows whether an image is a photo.</p></td></tr><tr><td><p>IsSuitableForOcr(): bool</p></td><td><p>Shows whether an image is suitable for OCR.</p></td></tr><tr><td><p>SaveAs( filename : string, \[optional] options : <a href="/flexi-capture/appendix/scripts/iexportimagesavingoptions">IExportImageSavingOptions</a> )</p></td><td><p>Saves the image. If no options are specified, the image is saved as \*.tif.</p></td></tr></tbody></table>

## Properties

<table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Name</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Type</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Access</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Handle</p></td><td><p>OLE\_HANDLE</p></td><td><p>Read-only</p></td><td><p>The Windows GDI handle of the picture.</p><p>In .NET this property can be used in System.Drawing.Image.FromHbitmap method to retrieve the picture object.</p></td></tr><tr><td><p>Height</p></td><td><p>int</p></td><td><p>Read-only</p></td><td><p>The height of the picture in dots</p></td></tr><tr><td><p>hPal</p></td><td><p>OLE\_HANDLE</p></td><td><p>Read/write, Mutable (can be modified even in scripts with read-only permissions)</p></td><td><p>The Windows handle of the palette used by the picture.</p><p>This property can be used in System.Drawing.Image.FromHbitmap as a second parameter.</p></td></tr><tr><td><p>IsBlackWhite</p></td><td><p>bool</p></td><td><p>Read-only</p></td><td><p>Whether the picture is black-and-white.</p></td></tr><tr><td><p>IsColor</p></td><td><p>bool</p></td><td><p>Read-only</p></td><td><p>Whether the picture is color.</p></td></tr><tr><td><p>IsGrayscale</p></td><td><p>bool</p></td><td><p>Read-only</p></td><td><p>Whether the picture is grayscale.</p></td></tr><tr><td><p>Type</p></td><td><p>SHORT</p></td><td><p>Read-only</p></td><td><p>The type of picture.</p></td></tr><tr><td><p>Width</p></td><td><p>int</p></td><td><p>Read-only</p></td><td><p>The width of the picture in dots</p></td></tr><tr><td><p>XResolution</p></td><td><p>int</p></td><td><p>Read-only</p></td><td><p>The horizontal image resolution</p></td></tr><tr><td><p>YResolution</p></td><td><p>int</p></td><td><p>Read-only</p></td><td><p>The vertical image resolution</p></td></tr></tbody></table>
