-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add PNG reading support #2382
Add PNG reading support #2382
Conversation
@andfoy Seems like Windows is not able to find libpng. I'm going to be reverting your PR again, can you integrate the changes in this branch and then try fixing the issues with Windows? |
Hi @andfoy, I've made a few suggestions in #2379 (review). Hopefully that may help you to get libpng to be found before installation. |
Thanks @peterjc123! Let me apply those suggestions here and hopefully it will work as expected |
Codecov Report
@@ Coverage Diff @@
## master #2382 +/- ##
=======================================
Coverage 70.76% 70.76%
=======================================
Files 93 94 +1
Lines 7788 7819 +31
Branches 1209 1214 +5
=======================================
+ Hits 5511 5533 +22
- Misses 1913 1918 +5
- Partials 364 368 +4
Continue to review full report at Codecov.
|
pytorch/pytorch#40928 is passing, so that means that the documentation build was fixed as well |
@fmassa You can merge it if you like. |
Thanks @andfoy and @peterjc123 ! |
* Add libpng requirement into conda recipe * Try to install libjpeg-turbo * Add PNG reading capabilities * Remove newline * Add image extension to compilation instructions * Include png functions as part of the main library * Update CMakeLists * Detect if building on conda-build * Debug * More debug messages * Print globbed libreries * Print globbed libreries * Point to correct PNG path * Remove libJPEG preventively * Debug extension loading * Link libpng explicitly * Link with PNG * Add PNG reading capabilities * Add libpng requirement into conda recipe * Try to install libjpeg-turbo * Remove newline * Add image extension to compilation instructions * Include png functions as part of the main library * Update CMakeLists * Detect if building on conda-build * Debug * More debug messages * Print globbed libreries * Print globbed libreries * Point to correct PNG path * Remove libJPEG preventively * Debug extension loading * Link libpng explicitly * Link with PNG * Install libpng on conda-based wheel distributions * Add -y flag * Add -y flag to yum * Locate LibPNG on windows conda * Remove empty else * Copy libpng16.so * Copy dylib on Mac * Improve check on Windows * Try to install ninja using conda on windows * Use libpng on Windows * Package lib on windows wheel * Point library to the correct place * Include binaries as part of wheel * Copy libpng.so on linux * Look for png.h on Windows when using conda-build * Do not skip png tests on Mac/Win * Restore libjpeg-turbo * Install jpeg-turbo on wheel distributions * Install libjpeg-turbo from conda-forge on wheel distributions * Do not pull av on conda-build * Add pillow disclaimer * Vendors libjpeg-turbo 2.0.4 * Merge JPEG work * Remove submodules * Regenerate circle config * Fix style issues * Fix C++ style issues * More style corrections * Add JPEG-turbo to linking libraries * More style corrections * More style corrections * More style corrections * Install libjpeg-turbo-devel * Install libturbo-jpeg on typing pipeline * Update Circle template * Windows and Unix turbojpeg have the same linking name * Install turbojpeg-devel instead of libjpeg-turbo * Copy TurboJPEG binaries to wheel * Move test image * Move back test image * Update JPEG test path * Remove dot from extension * Move image functions to extension * Use stdout arg in subprocess * Disable image extension if libpng or turbojpeg are not found * Append libpng stdout * Prevent list appending on lists * Minor path correction * Minor error correction * Add linking flags * Style issues correction * Address minor review corrections * Refactor library search * Restore access index * Fix JPEG tests * Update libpng version in Travis * Add -y flag * Remove dot * Update libpng using apt * Check libpng version * Change libturbojpeg binary * Update import * Change call * Restore av in conda recipe * Minor error correction * Remove unused comment in travis.yml * Update README * Fix missing links * Remove fixes for 16.04 * Remove JPEG-related code * Remove installation references to turbojpeg * Remove further references to turbojpeg * Fix c++ style issues * Fix c++ style issues * Fix libpng-config include flag parsing * Remove conda-forge * Remove include dirs from main extension * Do not pass extra include and library paths to main torchvision extension * Add libpng to environment.yml * Remove inexistent imports * Add instructions regarding environment variables to README * Fix image extension tests * Add libpng to environment + test fixes * Minor improvements * Remove unused Py2 code * Add stub comments to prevent deletion while merging * Reintroduce files in order to prevent deletion during merge * Remove unwanted merge sections * Restore libpng conda installation on wheel distributions * Restore comment * Fix libpng discovery on Windows * Fix PEP8 style issues * Add linking flag on Windows * Remove parenthesis * Restore libpng during runtime Co-authored-by: Edgar Andrés Margffoy Tuay <andfoy@gmail.com> Co-authored-by: Ryad ZENINE <r.zenine@gmail.com>
Follow-up from #2379 (comment)
Thanks to @peterjc123 , we found out that there was a bug in the tests that were preventing them to run.