-
-
Notifications
You must be signed in to change notification settings - Fork 329
improve: refactor APNG loader to use libpng-based implementation #1315
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
base: main
Are you sure you want to change the base?
Conversation
|
I don't know if my baseline is outdated, but I'm getting this compilation error, vs community 2022 solution 1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(164,71): warning C4003: not enough arguments for function-like macro invocation 'max'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(164,71): error C2589: '(': illegal token on right side of '::'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(164,40): error C2062: type 'unknown-type' unexpected
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(164,40): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(164,77): error C2059: syntax error: ')'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(263,52): warning C4003: not enough arguments for function-like macro invocation 'max'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(263,52): error C2589: '(': illegal token on right side of '::'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(263,23): error C2062: type 'unknown-type' unexpected
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')
1>D:\github\otclient.readme\src\framework\graphics\apng_png.hpp(263,71): error C2059: syntax error: ')'
1>(compiling source file 'otclient/x64/OpenGL/unity_QAHRA73EM9MJH98D.cpp')posible fix: ( )- std::min<uint32_t>(milliseconds, std::numeric_limits<uint16_t>::max()));
+ std::min<uint32_t>(milliseconds, (std::numeric_limits<uint16_t>::max)()));- totalFrames > std::numeric_limits<size_t>::max() / frameStride)
+ totalFrames > (std::numeric_limits<size_t>::max)() / frameStride) |
35bc000 to
e5a42be
Compare
|
|
This PR is stale because it has been open 45 days with no activity. |
Replaces the custom APNG loading and saving logic in apngloader.cpp with a new implementation based on libpng, moved to apng_png.hpp. Updates CMakeLists.txt to require PNG, and ensures libpng is built with APNG support. This change modernizes and simplifies APNG handling, improving maintainability and leveraging standard library support.
|



Replaces the custom APNG loading and saving logic in apngloader.cpp with a new implementation based on libpng, moved to apng_png.hpp. Updates CMakeLists.txt to require PNG, and ensures libpng is built with APNG support. This change modernizes and simplifies APNG handling, improving maintainability and leveraging standard library support.