# How to export RGB image file by multiple single component TIFF image file?

**URL:** https://discourse.vtk.org/t/how-to-export-rgb-image-file-by-multiple-single-component-tiff-image-file/13143
**Category:** Support
**Created:** [January 25, 2024, 3:34am UTC](https://discourse.vtk.org/t/how-to-export-rgb-image-file-by-multiple-single-component-tiff-image-file/13143 "2024-01-25T03:34:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tong\_yang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tong_yang/32/6355_2.png) [@tong\_yang](https://discourse.vtk.org/u/tong_yang)
#### Post date: [January 25, 2024, 3:34am UTC](https://discourse.vtk.org/t/how-to-export-rgb-image-file-by-multiple-single-component-tiff-image-file/13143/1 "2024-01-25T03:34:31Z")

</div>

Hello, I have multiple single component TIFF files. I can already export single component TIFF to RGB image files through vtkImageMapToColors.

Now, I want to convert multiple single component TIFF images into RGB image files, and the color mapping for each component is different.

So how can I solve this problem? Thanks a lot.

---

<div class="post-metadata">

### Author: ![tong\_yang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tong_yang/32/6355_2.png) [@tong\_yang](https://discourse.vtk.org/u/tong_yang)
#### Post date: [February 2, 2024, 2:54am UTC](https://discourse.vtk.org/t/how-to-export-rgb-image-file-by-multiple-single-component-tiff-image-file/13143/2 "2024-02-02T02:54:25Z")

</div>

Hello @Timothee_Chabat .

Recently, I have encountered another problem.

Could you please help me take a look.

Thanks a lot.

---

<div class="post-metadata">

### Author: ![tong\_yang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tong_yang/32/6355_2.png) [@tong\_yang](https://discourse.vtk.org/u/tong_yang)
#### Post date: [March 8, 2024, 5:50am UTC](https://discourse.vtk.org/t/how-to-export-rgb-image-file-by-multiple-single-component-tiff-image-file/13143/3 "2024-03-08T05:50:11Z")

</div>

For example, I currently have 4 vtkImageData, each of which is a single component and has a different color mapping. I need to merge these 4 vtkImageDatas into one vtkImageData, as shown in the following figure. I can already display them together through 4 volumes, but I cannot export them into image files such as png and jpg.

 ![123](https://discourse.vtk.org/uploads/default/original/2X/e/e14ccb5c1d005733d2b67b49fba0c0440fca396b.jpeg)
