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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user