vs_pdfium icon indicating copy to clipboard operation
vs_pdfium copied to clipboard

RE: turbojpeg-static.lib

Open tjenniges opened this issue 3 years ago • 4 comments

Hi Joe,

Why is "turbojpeg-static.lib" statically linked to instead of building from sources like the other "third_party" libraries in source?

I like your github repo because it builds from sources that one can check (except for turbojpeg-static.lib"). I think google has inadvertently created security issues with pdfium by not putting out official builds of pdfium -- people not familiar with C/C++ download pre-built DLLs from Github and Nuget without knowing if they can trust the "person" building the DLLs.

Thank you.

tjenniges avatar Mar 19 '21 01:03 tjenniges

Because, as I understand it, turbojpeg can’t be built with out-of-the-box Visual Studio because some of its source code is assembly language but it uses the NASM dialect of assembly rather than the MASM dialect. Now you can install an extension to Visual Studio that will compile NASM, but if I required an extension then someone could not just pull the GitHub repo and press build and have it work.

Someone correct me if I am wrong on this...

The other thing we could do is just replace turbojpeg with regular libjpeg code and it would compile but would just be slower decoding Jpegs which imo would not be that big of a deal

jwezorek avatar Mar 24 '21 04:03 jwezorek

I don't think it would be that big of a deal. What would be the cost, fractions of a millisecond per decoded image?

tjenniges avatar Mar 27 '21 00:03 tjenniges

Right that’s my thinking too ... so maybe I’ll do that.

jwezorek avatar Mar 29 '21 14:03 jwezorek

When I compile it into a dynamic link library, it prompts me

1> LINK: fatal error LNK1104: Unable to open file 'turbojpeg static. lib'

1000374 avatar Dec 05 '23 11:12 1000374