# cvb.Image.from\_images() not giving expected output

**URL:** https://forum.commonvisionblox.com/t/cvb-image-from-images-not-giving-expected-output/1414
**Category:** Python API
**Created:** [May 17, 2021, 12:34pm UTC](https://forum.commonvisionblox.com/t/cvb-image-from-images-not-giving-expected-output/1414 "2021-05-17T12:34:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Swaab](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Swaab](https://forum.commonvisionblox.com/u/Swaab)
#### Post date: [May 17, 2021, 12:34pm UTC](https://forum.commonvisionblox.com/t/cvb-image-from-images-not-giving-expected-output/1414/1 "2021-05-17T12:34:35Z")

</div>

Hi there!

I found the from\_images() function in the cvbpy documentation and tried a simple implementation of it, but i can’t get it to work. It just returns the first image from the list.

Additionally I’m wondering if its possible to create an cvb.Image object from a numpy array?

Im working with:

- platform: Windows 10
- python version: 3.8.8
- CVB version: 13.03.002

```python
	    file_name = "Clara.png"
	    file_name_out = "Clara_dual.png"
	    path = os.path.join(PATH_MEDIA, "container", file_name)
	    path_out = os.path.join(PATH_MEDIA, "container", file_name_out)

	    src_image = cvb.Image(path)
	    double_image = src_image.from_images(0, [src_image, src_image])
	    double_image.save(path_out) # this will just be the first image

```

---

<div class="post-metadata">

### Author: ![s-woe](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/s-woe/32/572_2.png) [@s-woe](https://forum.commonvisionblox.com/u/s-woe)
#### Post date: [May 18, 2021, 9:07am UTC](https://forum.commonvisionblox.com/t/cvb-image-from-images-not-giving-expected-output/1414/2 "2021-05-18T09:07:19Z")

</div>

Hi @Swaab,

Question 1: What image manipulation do you aim to implement?  
I can guess you want the two images side-by-side . that would be the result of

```auto
cvb.PanoramicMappedImage.create_horizontal(image1,image2)

```

Question 2: You can get the cvb.Image from an numpy.ndarray

```auto
import numpy as np
import cvb
nparray = np.ones((2,2))
image = cvb.WrappedImage.from_buffer(nparray)

```

(in this sample for a 2x2 image of ones.)

---

<div class="post-metadata">

### Author: ![Swaab](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Swaab](https://forum.commonvisionblox.com/u/Swaab)
#### Post date: [May 19, 2021, 12:15pm UTC](https://forum.commonvisionblox.com/t/cvb-image-from-images-not-giving-expected-output/1414/3 "2021-05-19T12:15:19Z")

</div>

Q1: Yes side by side indeed! Ill check your function later this week, but that oughta do it  
Q2: Perfect!
