How does matplotlib display [0,1] float32 images on the monitor?

Hi,

I have been struggling to understand how matplotlib imshow actually display images. To start off, i have an uint16 grayscale image which I converted to [0,1] float32 (which imshow internally does anyway). Now, after going through vmin, vmax, and cmap LUT transformations (which again, imshow does internally), the image is still in float32. From there on, how does it get displayed on the monitor? Because on the monitor, it still expects 8bit input (or 24 bit for 8bit per channel) ? I have been looking around for an answer for this everywhere, but could not find it… does it somehow quantize back to uint8 for display purpose only? if so, where is the source code for it?

Cheers,