uint16 numpy array to qimage with 16 Bits and view support
Hey, I would like to create a QImage from a 16Bit numpy array and ideally without converting to 8Bit, aswell as creating a view into the memory of the 16Bit image. Is this possible?
If you find a format supported by QImage here: https://doc.qt.io/qt-6/qimage.html#Format-enum then it should be possible. (It is not clear what you mean with 16 bits, for instance there are Format_Grayscale16, Format_RGB16, Format_RGB555, Format_ARGB4444_Premultiplied and others.)
If you want to work with views only (no copying), then you should create a QImage with the desired properties, create a view into it, and fill that with numpy operations (many, but not all numpy operations allow specifying the target array instead of creating their own).