Hey there, I'm working on an application that uses colormaps to plot some data. In some cases, I don't need to use the entirety of the colormap to plot all of my data. In order to save on memory I tried to resize the colormap using the function

colorMap->data()->setSize(x,y);

However this function causes all the data in the colormap to be erased.

I understand that this is intended, but is there a way to resize a colormap while preserving its data up to a certain point?