# How to get CVB Color Format programatically

**URL:** https://forum.commonvisionblox.com/t/how-to-get-cvb-color-format-programatically/767
**Category:** Programming Questions
**Tags:** genicam, colorformat
**Created:** [May 14, 2019, 1:04pm UTC](https://forum.commonvisionblox.com/t/how-to-get-cvb-color-format-programatically/767 "2019-05-14T13:04:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![popeye](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@popeye](https://forum.commonvisionblox.com/u/popeye)
#### Post date: [May 14, 2019, 1:04pm UTC](https://forum.commonvisionblox.com/t/how-to-get-cvb-color-format-programatically/767/1 "2019-05-14T13:04:18Z")

</div>

How can i read the CVB Color Format(defined in the GenICam Device Configurator) programatically via the C++ API?

I have found a function to set it, but no function to get/read it.

---

<div class="post-metadata">

### Author: ![Andreas](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/andreas/32/75_2.png) [@Andreas](https://forum.commonvisionblox.com/u/Andreas)
#### Post date: [May 15, 2019, 8:55am UTC](https://forum.commonvisionblox.com/t/how-to-get-cvb-color-format-programatically/767/2 "2019-05-15T08:55:27Z")

</div>

Hi @popeye

the CVB Color Format form the GenICam device configuration is written into the GenICam.ini file as integer. This file is located in %CVBDATA%/drivers. The format will be applied to the streamed images if you load a device using the GenICam.vin.  
There is no direct way to read it, except from the INI file.  
Can you describe your use case, I guess there is another way to cover your requirement.

---

<div class="post-metadata">

### Author: ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)
#### Post date: [May 15, 2019, 8:00pm UTC](https://forum.commonvisionblox.com/t/how-to-get-cvb-color-format-programatically/767/3 "2019-05-15T20:00:40Z")

</div>

If you use the discover interface (`DeviceFactory::Discover`), you can call `.SetParameter("PixelFormat", "0")` on the returned entries (not on the list). The `"0"` is the value from the _ini_ file; meaning raw in this case.
