Merge pull request #13612 from cjmayo/draft-byteCount

Draft: Fix QImage object has no attribute 'byteCount'
This commit is contained in:
Roy-043
2024-04-25 09:20:10 +02:00
committed by GitHub

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))