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

Image Viewer using pyvips? #18

Open
prasadbandodkar opened this issue Jun 13, 2023 · 2 comments
Open

Image Viewer using pyvips? #18

prasadbandodkar opened this issue Jun 13, 2023 · 2 comments

Comments

@prasadbandodkar
Copy link

How would you recommend using pyvips to perform visualization instead of using the C version of vips? I am asking this because I couldn't find the vips_sink_screen function implemented in any of the Classes in pyvips.

Also, if I want to build a visualizer using libvips, is the C implementation my only option?

@jcupitt
Copy link
Owner

jcupitt commented Jun 13, 2023

Hi @prasadbandodkar,

I think it just needs binding, it shouldn't be too hard.

sink_screen() used to be very difficult to bind since callbacks came from worker threads. You would have needed a layer to serialise these things and work around the GIL.

sink_screen() was refactored a few years ago and is now really simple: all callbacks always come from the main thread, so there's no serialisation required, and there are no GIL issues to work around.

Absent a binding for sink screen, you can use fetch to pull tiles from a pipeline and paint the display. It won't be parallelised though.

@jcupitt
Copy link
Owner

jcupitt commented Apr 9, 2024

You could also bind the image display widget from vipsdisp and use it in a pygtk program. Again, this should be pretty simple.

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

2 participants