# Export png failed: failed to get graph rgb color data

**URL:** <https://forum.techsoft3d.com/t/export-png-failed-failed-to-get-graph-rgb-color-data/2836>\
**Category:** HOOPS Visualize Web\
**Tags:** code\
**Created:** [November 2, 2023, 8:39am UTC](https://forum.techsoft3d.com/t/export-png-failed-failed-to-get-graph-rgb-color-data/2836 "2023-11-02T08:39:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![136638675](https://avatars.discourse-cdn.com/v4/letter/1/e47c2d/32.png) [@136638675](https://forum.techsoft3d.com/u/136638675)\
**Post date:** [November 2, 2023, 8:39am UTC](https://forum.techsoft3d.com/t/export-png-failed-failed-to-get-graph-rgb-color-data/2836/1 "2023-11-02T08:39:47Z")

</div>

![图片](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/9/971d87f4c3af83c784c7d88dcfe757ae7f0bcfec.png)  
I am seeking assistance with a problem I am facing while working on a project in the WSL Ubuntu 22.04 environment.  
I successfully executed a source program named “Converter,” but when I attempt to save an image using my own C++ code, it fails. error: failed to get graph rgb color data  
as the rest of the code executes without any problems. It can works in windows.

Here is a snippet of my C++ code related to image saving:

```auto
				string curFileName = fileBase + std::to_string(i) + ".png";
				exporter.WritePNG(curFileName.c_str(), pngOutPut.xres, pngOutPut.yres, pngOutPut.backgroundColor, pngOutPut.cameraOverride,
													size_diraction[i], pngOutPut.fitWorldExact, pngOutPut.enableHiddenLine, pngOutPut.enableTransparentBackground,
													pngOutPut.exportPmi, pngOutPut.renderingMode, pngOutPut.lightingMode);

```

If anyone has encountered a similar issue or has any suggestions on how to resolve this, please let me know. I would greatly appreciate your help.

---

<div class="post-metadata">

**Author:** ![gabriel.peragine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/gabriel.peragine/32/1535_2.png) [@gabriel.peragine](https://forum.techsoft3d.com/u/gabriel.peragine)\
**Post date:** [November 3, 2023, 4:28pm UTC](https://forum.techsoft3d.com/t/export-png-failed-failed-to-get-graph-rgb-color-data/2836/2 "2023-11-03T16:28:20Z")

</div>

Hey there, thanks for reaching out. I see a similar case in support so I’ll check that out. Perhaps @beau.trifiro or @Toshi-TS3D may be able to help.

Are you in a current evaluation and do you know if your license is still active?

---

<div class="post-metadata">

**Author:** ![Toshi-TS3D](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/toshi-ts3d/32/885_2.png) [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Post date:** [November 6, 2023, 12:51am UTC](https://forum.techsoft3d.com/t/export-png-failed-failed-to-get-graph-rgb-color-data/2836/3 "2023-11-06T00:51:17Z")

</div>

Hello,  
Most Linux-based servers are not set up for 3D graphics rendering by default. Many operations, such as converting certain types of files and creating PNG images, require that an X server and additional graphics libraries are available.  
The recommended approach for using HOOPS Converter on Linux servers without graphics hardware is to utilize [Xvfb](https://en.wikipedia.org/wiki/Xvfb).  
Please refer the Running in a “Headless” Linux environment section in the following link:  
[https://docs.techsoft3d.com/communicator/latest/prog\_guide/data\_import/cad\_conversion/converter\_app/converter-application-overview.html](https://docs.techsoft3d.com/communicator/latest/prog_guide/data_import/cad_conversion/converter_app/converter-application-overview.html)
