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
Convert tools/vipsprofile to Python 3+2 #1262
Conversation
Hello, thanks for this! I tried it out and there are two small problems still.
Would you like to make these changes? I can do it if you're busy. You can test the script like this:
I'm not sure why it's claiming a leak, I should check. |
I'll get back to that later today. Thanks for fast feedback. |
Do you have some Anyway, I tried to guess hard what should use floor division, hopefully I got it right. |
You can use any image. That was a 10k x 10k RGB (you need to give it something big to get a nice graph), but anything would work. |
That looks great! |
I read your patch and I agree with everything. Nice job, and thank you very much for doing this work! |
Thanks. |
The new optional dependencies increase closure size from 388.92 MiB to 414.0 MiB, a negligible change. I didn't think there was any reason to add `withLibjpeg ? true` flags (or `enableLibjpeg`). The optional dependencies are sorted in the order of https://github.com/libvips/libvips/blob/master/README.md and I have used `nix log` on the build to check they are all picked up in configure. The python3 support was in for ages (libvips/libvips#202), the remaining python3 support in tools/vipsprofile landed in libvips/libvips#1262 so I upgraded it to python3. I wasn't sure if I should use a specific version, or just leave it as python3. I have tested vipsprofile with ``` ./vips-pycairo-bin/bin/vips gaussblur ~/2021-04-30-092143_3286x1080_scrot.png x.tif 5 --vips-profile ./vips-pycairo-bin/bin/vipsprofile ``` where ~/2021-04-30-092143_3286x1080_scrot.png is just a random image (screenshot) I had lying around. It seems to have generated an SVG file, I don't know how to interpret it.
I don't know how to test this (I don't know or use libvips), so please give it a try.
Unless there is a typo, I'm pretty confident this cannot break anything, however I don't know yet if this the full change needed.