Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

im.add_mipmap requires five parameters, but only four arguments are being used #8685

Open
marinelay opened this issue Apr 17, 2024 · 0 comments

Comments

@marinelay
Copy link
Contributor

Software Versions

  • Python: 3.9.18
  • OS: Ubuntu 22.04
  • Kivy: 2.3.0
  • Kivy installation method: pi pinstall

Describe the bug

im = ImageData(width, height, dds.dxt, dds.images[0], source=filename,
flip_vertical=False)
if len(dds.images) > 1:
images = dds.images
images_size = dds.images_size
for index in range(1, len(dds.images)):
w, h = images_size[index]
data = images[index]
im.add_mipmap(index, w, h, data)
return [im]

While im.add_mipmap has five parameters (def add_mipmap(self, level, width, height, data, rowlength):),
there are only four arguments at line 35.

I think it's a bug, but I'm not sure how to reproduce it.
I apologize for not providing reproduction code.

Code and Logs and screenshots

im = ImageData(width, height, dds.dxt, dds.images[0], source=filename,
flip_vertical=False)
if len(dds.images) > 1:
images = dds.images
images_size = dds.images_size
for index in range(1, len(dds.images)):
w, h = images_size[index]
data = images[index]
im.add_mipmap(index, w, h, data)
return [im]

def add_mipmap(self, level, width, height, data, rowlength):
'''Add a image for a specific mipmap level.
.. versionadded:: 1.0.7
'''
self.mipmaps[level] = [int(width), int(height), data, rowlength]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant