> ## 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.

# AddImageFromStream Method of the Batch Object

This method allows you to add an image from stream to the batch. The method creates a new document in the batch for added image.

> [!NOTE]
>
> When adding an image, the parameters of image preparation ([**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object) are used, which are identical to the parameters related to the batch type into which the image is added.

## Syntax

```vb Visual Basic .NET theme={null}
Sub AddImageFromStream(readStream As IReadStream)
```

```cpp C++ theme={null}
HRESULT AddImageFromStream(
  IReadStream readStream
);
```

## Parameters

**readStream**

\[in] Refers to the interface of the user-implemented object of the type [**IReadStream**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/ireadstream.md) which contains the image file to be added to the batch.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

* To add several images to the batch, you can use the [**AddImages**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-addimages.md) method of the [**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md) object. This method allows you to set different parameters of image adding.
* This method does not open digital documents. Use the [**AddImage**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-addimage.md) or [**AddImages**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-addimages.md) method if you need to open digital documents.

## See also

[**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md)
