The first place I checked was the ControllerExtensionDefinition, then the host. I see classes dealing with Bitmaps, but haven't found a connection.
For context: my first extension: https://github.com/ensonic/bitwig-timecalc (https://github.com/ensonic/bitwig-timecalc)