Skip to content

Commit

Permalink
Set channel type to RGB(A) for 3 & 4 channel images in natvis Image v…
Browse files Browse the repository at this point in the history
…isualiser

This sets the channel type to RGB and RGBA for 3 and 4-channel images respectively, for the eos::core::Image natvis (Image Watch) visualiser.
With this improvement, Image Watch displays our RGB(A) eos::core::Images with correct colours, and doesn't interpret them as BGR (its default) anymore.
  • Loading branch information
patrikhuber committed Jan 30, 2019
1 parent 7af6131 commit 622fc35
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .natvis/eos.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
<DisplayString>FLOAT64</DisplayString>
</Synthetic>

<Item Name="[channels]">$T2</Item>
<Synthetic Name="[channels]" Condition='$T2 == 3'>
<DisplayString>RGB</DisplayString>
</Synthetic>
<Synthetic Name="[channels]" Condition='$T2 == 4'>
<DisplayString>RGBA</DisplayString>
</Synthetic>
<!-- Note: I haven't found out how to do "if $T2 is not 3 or 4, then just use $T2". -->

<Item Name="[width]">width_</Item>
<Item Name="[height]">height_</Item>
Expand Down

0 comments on commit 622fc35

Please sign in to comment.