-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
libjpeg-turbo for windows #458
Conversation
@vnsavage 👍 This is great, thank you! |
LGTM |
@vweevers could you please resubmit? |
Rebased the PR. |
/cc @rvagg @TooTallNate |
Soooo .. libjpeg-turbo isn't just a Windows thing, does it make any sense in enabling support for this on non-Windows too or does gtk make that difficult? This also needs docs before merging IMO because it introduces another awkward yak to shave on Windows to get this running (already painful enough!). Also @kangax fwiw I'd take @kkoopa's +1 as meaning it's worthy of merging, he should probably even be a collaborator here, moreso than me at least. |
@rvagg this isn't about libjpeg_-turbo_ per se. Only about JPEG support, which other systems already have. I'd rather see a quick merge and then let turbo support for non-windows be a separate issue. Couple of thoughts about the docs, which I would be happy to update:
|
I agree it wouldn't be worth holding this up but if turbo really is that much faster then it night be worth supporting for other platforms too. Perhaps someone could ticket this? Re docs: I'm of two minds on the node-gyp overlap, on one hand it's easier to have a single source of docs on how to do compiles on Windows so pointing to nodr-gyp makes sense but on the other hand a large number of bug reports on native addons I maintain are exactly because people didn't follow the links and install as they are supposed to. People don't read if you give them too much to read (me included). I might leave that for others to judge, perhaps you have some thoughts @kangax? |
I'm indifferent on this |
I have cleaned up and updated the docs. |
@vweevers This works for me, but I'd add a note to the libjpeg-turbo installation section saying (again) that architectures must match (32/64 bit), and that if you install 64 bit, either |
@zbjornson Good point. I've since learned one can also do
Hakuna matata, the wiki can directly link to the binaries instead. I will update the wiki asap, and maybe see if I can add a util script that checks if either C:\libjpeg-turbo or C:\libjpeg-turbo64 exists, based on node's bitness. |
Rebased and updated PR to support 64 bit libjpeg-turbo. Can this be merged? It's been a year ;) |
Hi @vweevers, sorry for the delay on this, lets make it happen! Could you please squash the commits into one and rebase on the latest master? I'll promise to review it when it's done. Am I correct in assuming that the wiki has already been updated with the instructions? It looks like it. |
Thanks for the ping @zbjornson, I forgot about this. I'll rebase in a minute |
so.... why isn't this pr merged? |
I think it's scheduled for version 2, doesn't seem like it would break backwards compatibility though |
I would be open to merging this now, as long as it doesn't require anything that wasn't previously required |
@LinusU yep, this proceeds quietly without JPEG support if libjpeg is not present. However, I just learned that this doesn't appear to compile with VS2015 because reason. That means if someone has VS2015 and libjpeg installed then they will no longer be able to build. The fixes provided there:
No
Those APIs are used
Boo Can look at using gnuwin's jpeg instead, (edit) or using libjpegturbo for all platforms. |
Ugh, that's a shame... This is probably a really dump question but doesn't GTK include a JPEG library on windows? I have a vague memory but it's probably wrong...
Searching around I think that I'm leaning towards gnuwin's jpeg, as I would prefer to now introduce another dependency on the other platforms... edit: @zbjornson I will trust your instinct on this since you are running Windows and your other contributions have been stellar ✨ |
Since I really wanna get an MSYS build going, I think I just got gyp/VS2015 to compile against the MSYS/MinGW version of libjpeg-turbo. You just have to use You can get all of node-canvas's features (pango, gif, free type, etc) working that way. You end up with more DLLs in the release folder but it's probably better than the GTK.zip people are using now |
Ehh, I just merged #841, is this the same thing or is this using another library? Sorry, I'm not using Windows at all these days so I'm not in the loop... ping @zbjornson and @chearon, some thoughts on how to proceed would be appreciated :) |
Merging #841 was correct, it fixes the issue that came up in this PR :) |
Awesome, closing this then 👍 |
This PR adds JPEG support to canvas under Windows. See also #427. Instructions for user are simple: install
libjpeg-turbo
to it's default location.A batch script tests if the directory exists, so nothing breaks when libjpeg-turbo is not installed.