Skip to content

How to proceed with libjpeg support on Windows #427

@vweevers

Description

@vweevers

As GTK no longer bundles libjpeg, jpeg support needs to be fixed. There are multiple solutions to this:

  1. Use the *.lib files (and includes) from libjpeg-turbo.
    • User must download libjpeg-turbo-1.3.1-vc.exe (or the 64bit version), which by defaults installs to C:\libjpeg-turbo. See my fork for a working example. This is similar to how GTK is included, except that I did a static include, because it's a small thing. Note, I forked from 1.1.3 because master fails to build on windows.
  2. Use sources of original libjpeg
    • Because it's a zip file (1 MB), we could automatically download it as part of the build process, unzip with a Python script (no extra deps) and then build it to jpeg.lib.
    • Building it (outside of node-canvas and gyp) is simple (nmake /f makefile.vc setup-v10 && nmake /f makefile.vc nodebug=1 libjpeg.lib). I think it's feasible to rewrite the makefile stuff as a gyp target.. well, worth a try, at least. Make that target a dependency if OS=="win" and everything is awesome.

What's standard practice for dependencies like these? Except ignoring windows. Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions