hmeine / qimage2ndarray

qimage2ndarray is a small python extension for quickly converting between QImages and numpy.ndarrays (in both directions).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Pyside6 anytime soon?

christli7 opened this issue · comments

Hi, I just wanna ask if you are planning to support Pyside6 soon?
Thank you!

I am in favor of doing so, but I do not use PySide myself and am not aware of what has to be done at all.

Do you have an idea what would be necessary, and/or would be able to look into that? I assume the amount of work might be minimal, possibly just extending the version check / backend decision appropriately.

Hey I also ran into the PySide6 issue and could fix it with the same changes @hmeine made in his last commits. Are there any problems with these changes or why is there no new release yet? I really appreciate the great work on this package!

Agreed, it would be great to have a release with PySide6 support :)

Add my vote to this list of people asking for a release with pyside6 support.

I see – looking at the changes since last release, I think one obstacle is that I started adding support and tests for 64bit pixel types. Do the unit tests run for you with PySide6?

I thought I would probably at least have to make the unit tests conditional. I tried to make the main code compatible with different versions of Qt and wrappers that do or do not (yet) support 64 formats, and reviewing the code from my past self, I still think that could be released.

If anyone of you working with PySide6 knows how to tackle the CircleCI problem with PySide6 (something like libEGL not found), I'd be glad. One might need to know more about CircleCI than I do.

I just released version 1.9.0.

If anyone of you working with PySide6 knows how to tackle the CircleCI problem with PySide6 (something like libEGL not found), I'd be glad. One might need to know more about CircleCI than I do.

I never used CircleCI but it seems that a dependency of PySide6 is missing. Adding sudo apt install libegl1 to the .circleci/config.yaml might already fix it.

sudo apt install libegl1 && pip install numpy PySide6 pytest

It seems that this is a related issue and there might be an option in the future to directly install this dependency with PySide6

Cool, that helped – I had to add apt-get update and installation of xkbcommon0 as well, but now I am a good step forward. However, now I see something that looks like real unit test errors: https://app.circleci.com/pipelines/github/hmeine/qimage2ndarray/39/workflows/40cdbabe-ec45-4eeb-87f4-f89fba71efbd/jobs/83

The tests complain about missing QImage attributes "byteCount" and "numBytes" (one of them would be needed).

Wow! The seem to have renamed the method again, now into "sizeInBytes"… https://doc.qt.io/qtforpython/PySide6/QtGui/QImage.html#PySide6.QtGui.PySide6.QtGui.QImage.sizeInBytes

I mean, "numBytes" was definitely worse than "byteCount", but the latter was not so bad, was it?!

Ah, sizeInBytes was necessary in order to support images > 2GiB and has been introduced in Qt 5.10.

Nice, now even CircleCI is happy again (for the first time in a long time)!