## XpsDocument::CreateImage(System::SharedPtr\<System::IO::Stream\>) method


Creates a new image resource out of *stream* .

```cpp
System::SharedPtr<XpsModel::XpsImage> Aspose::Page::XPS::XpsDocument::CreateImage(System::SharedPtr<System::IO::Stream> stream)
```


| Parameter | Type | Description |
| --- | --- | --- |
| stream | System::SharedPtr\<System::IO::Stream\> | The stream containing the image to take as a resource. |

### ReturnValue

New image resource.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XpsImage](../../../aspose.page.xps.xpsmodel/xpsimage/)
* Class [Stream](../../../system.io/stream/)
* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
## XpsDocument::CreateImage(System::String) method


Creates a new image resource out of image file located at the *imagePath* .

```cpp
System::SharedPtr<XpsModel::XpsImage> Aspose::Page::XPS::XpsDocument::CreateImage(System::String imagePath)
```


| Parameter | Type | Description |
| --- | --- | --- |
| imagePath | System::String | The path to the image to take as a resource. |

### ReturnValue

New image resource.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XpsImage](../../../aspose.page.xps.xpsmodel/xpsimage/)
* Class [String](../../../system/string/)
* Class [XpsDocument](../)
* Namespace [Aspose::Page::XPS](../../)
* Library [Aspose.Page for C++](../../../)
