-
Notifications
You must be signed in to change notification settings - Fork 148
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
Save screenshots as PNG #347
Conversation
5efa431
to
5b69ca2
Compare
35abf8e
to
2d6f978
Compare
Depends on #362 and is pending a changelog entry, but other than that: LGTM. |
c5236bd
to
da79d09
Compare
The warning is genuine, you shouldn't mix C++ exceptions with |
@IntelOrca Ah, interesting. Given that's it's literally what the libpng docs say, I assumed it was fine. But it's a C library, of course. How would you change the code to prevent the warning? Would just wrapping the lot in |
Do you have a link to the docs? Maybe some compilers can do it. Anyway, it is a C library so you will have to do it the C way. Duplicate dispose calls on all tails, a goto end label or micro routines that return exit codes appropriately. I always found setjmp a dodgy solution to error handling over exit codes anyway, I don't know if you can avoid setjmp in libpng or not. |
I'm not seeing any errors on macOS or Linux, no, but it could just be that they've not been enabled. The docs are over at http://libpng.org/pub/png/libpng-manual.txt |
Libpng is infamous for the setjmp stuff. But we can still avoid it:
|
On Linux it will load the shared version of libpng which won't behave how you want though right? |
44eb156
to
3cd1761
Compare
Thanks for the feedback. I had hoped I had come up with an acceptable solution in 3cd1761, but I'm getting the same error in AppVeyor. Any thoughts? Do we really need to avoid |
No you can use it, just isolate in a function without any C++ exception throws or catches. |
It seems the Ubuntu Docker images were never updated to include libpng either, despite the Dockerfiles having been updated. The cause seems to be a broken webhook. We still need a solution for MinGW too. @janisozaur Could you help out with this? I've posted some details in the team chat. I have tested the PR locally in an Ubuntu 18.04 VM, following the Dockerfile instructions to install packages. With the patches from this PR, it compiles, links, and runs. |
Disable MSVC warning 4611 in new Screenshot.cpp
8c7e048
to
56132c0
Compare
2c47375
to
9b00573
Compare
No description provided.