Draft: Fix QImage object has no attribute 'byteCount'

'PySide6.QtGui.QImage' object has no attribute 'byteCount'
load_texture: unable to load texture
This commit is contained in:
Chris Mayo
2024-04-23 19:35:54 +01:00
parent eb3e83b97a
commit 213b61427a

View File

@@ -734,7 +734,7 @@ def load_texture(filename, size=None, gui=App.GuiUp):
# else:
# p = QtGui.QImage(filename)
size = coin.SbVec2s(p.width(), p.height())
buffersize = p.byteCount()
buffersize = p.sizeInBytes()
width = size[0]
height = size[1]
numcomponents = int(buffersize / (width * height))