-
Notifications
You must be signed in to change notification settings - Fork 13
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
APNG patch by Daisuke Nishikawa #8
base: wx
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch. I left some comments, mostly related to generating the config files.
Maybe you can leave a link to the source of the patch as well, both in the PR and in the commit message: https://sourceforge.net/projects/libpng-apng/
pngpriv.h
Outdated
# if defined(_MSC_VER) && _MSC_VER <= 1500 | ||
// Don't enable for VC9 and older: missing include file immintrin.h | ||
# define PNG_INTEL_SSE_OPT 0 | ||
# elif defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ | ||
# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is part of the patch. It removes our fix for building with Visual Studio 2008. This version is not supported anymore so it is not really a problem to remove this, but it would be better to do it in a separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected in commit: 6af7391
pnglibconf.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitions have been removed from this file, which seems wrong. Please use the official method to create this file as described in
https://github.com/wxWidgets/wxWidgets/blob/master/docs/contributing/how-to-update-third-party-library.md#libpng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pngprefix.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many defines have been added to this file, which seems wrong. It causes at least one build warning: png.c(2785,9): warning C4005: 'png_fp_add': macro redefinition
Please use the official method to create this file as described in
https://github.com/wxWidgets/wxWidgets/blob/master/docs/contributing/how-to-update-third-party-library.md#libpng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE in commit: ab9d40f
Thank you! I'm going to apply your comments in to forked source during second half of the day. Best, |
APNG patch credits added in commit: 902b882 |
I have made the changes you requested. They were done in several commits. If it's okay, we can move forward. If not, I can fork and create a pull request again. Let me know. Best, |
Thanks for the fixes. There is no need for a new pull request. When merging the PR, all commits can be squashed into 1. I only have a remark about 902b882 (APNG patch credits). I did not mean to add an entry to the I only meant to put a link in the description (first message) of this PR, because currently it is empty: When squashing/merging this PR, @vadz can probably include the link in the commit message. |
And just for reference, |
Thanks for the PR, it looks nice and tidy (although I definitely didn't check it in details), but my main question is how are we going to maintain this, i.e. update it when we upgrade to the next libpng version or if/when the new version of this patch is made? More generally, I'm not in a hurry to merge this because now that it's here, you can make a PR to the main repository using it, to show how it is going to be actually used, and this will be the important part. TIA! |
The file has been restored as in the forked version, commit: 0e8b65a Let me know if there's anything else I need to do, or if I should create wxapng2 and upload the changes with comments again in the correct order as you requested. |
Well... That is a very good question. At this point, version 1.6.47 has already been released. I have the impression that these changes are more like small fixes and additions rather than revolutionary modifications. I’d also like to remind you that just a few weeks ago, wxWidgets was running without any issues on the libpng library from 2019. Currently, I’m fairly engaged, so with your guidance, I could probably take care of this. Maybe it's worth contacting the author of the patch (I can do it) and mentioning the work being done here with wxWidgets. His involvement would definitely help support this effort. We could establish a setup where wxWidgets can be compiled with either the vanilla libpng or libpng with the APNG patch. In that case, the source tree could have two directories: src/png (wx_ version) and src/apng (wx_ + APNG patch version). Then, wxWidgets could be compiled with -DwxPNG_APNG_SUPPORTED=ON or --enable-apng-support. |
No, this PR is fine. You can now start adding support for multiple images in
Ideally when we upgrade libpng, there will be an apng patch available for that version. But if there is not, the only thing that seems to needs updating are the
There is no need for multiple sources. We can just add a build option to disable apng, and change this patch to: +#ifdef wxUSE_LIBPNG_WITH_APNG
#define PNG_APNG_SUPPORTED
#define PNG_READ_APNG_SUPPORTED
#define PNG_WRITE_APNG_SUPPORTED
+#endif |
Ok. It should take a 7-day sprint to do it. |
Maybe this can be useful for you. It should work for APNG too once you add |
👍 Overall, I already reviewed the code two weeks ago, but after two comments from one person, I had to take a breather... I enjoy working in a positive atmosphere. Thanks for the suggestions. I have a few projects here, and as soon as I wrap things up there, I'll sit down and do it. |
No description provided.