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

Feature request: Support "non-restricted types" in experimental viewer #99

Open
dprov opened this issue Jun 28, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@dprov
Copy link

dprov commented Jun 28, 2024

Disabling svifpd.restrictImageTypes allows viewing other image types, which is great. Not sure of the extent of what can work, but just for context it works out of the box in my case for a C++ Image type bound with pybind11 that supports the buffer protocol / can be converted to a numpy array using np.asarray().
However, these "extra types", or at least he one I'm using, do not seem to be supported in the "new" image viewer (which is also great by the way). Would it be easy to add this support?

Not sure if my understaning is correct, but from
(

) it seems like the "other types" work if they are convertible to numpy arrays and are of correct dimensions.
If that is the case, couldn't they use the same visualisation method / data transfer as numpy arrays?

Thanks

@dprov dprov changed the title Feature request: Support "non-restricted types" in experimental views Feature request: Support "non-restricted types" in experimental viewer Jun 28, 2024
@elazarcoh
Copy link
Owner

For the new image viewer, the relevant code is here:
https://github.com/elazarcoh/simply-view-image-for-python-debugging/blob/main/src%2Fpython%2Fsocket_client.py#L208

As you can see there, and the function below that is used for pillow images, it is simple enough if it conforms with the asarray protocol.
I would prefer it if it can be checked to be conforming before trying to actually convert it.

@elazarcoh elazarcoh added the enhancement New feature or request label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants