Additional information/corrections involving libjpeg v7/v8b emulation

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@278 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2010-10-18 02:21:10 +00:00
parent b42a48cc44
commit 5559c900c0

View File

@@ -75,36 +75,38 @@ links to the libjpeg dynamic library located in /opt/libjpeg-turbo/{lib}. This
will effectively accelerate every dynamically linked libjpeg application on the will effectively accelerate every dynamically linked libjpeg application on the
system. system.
The Windows distribution of the libjpeg-turbo SDK installs jpeg62.dll into The Windows distribution of the libjpeg-turbo SDK installs the libjpeg-turbo
c:\libjpeg-turbo\bin, and the PATH environment variable can be modified such DLL (jpeg62.dll, jpeg7.dll, or jpeg8.dll, depending on whether libjpeg v6b,
that this directory is searched before any others that might contain v7, or v8 emulation is enabled) into c:\libjpeg-turbo[64]\bin, and the PATH
jpeg62.dll. However, if jpeg62.dll also exists in an application's install environment variable can be modified such that this directory is searched
directory, then Windows will load the application's version of it first. Thus, before any others that might contain a libjpeg DLL. However, if a libjpeg
if an application ships with jpeg62.dll, then back up the application's version DLL exists in an application's install directory, then Windows will load this
of jpeg62.dll and copy c:\libjpeg-turbo\bin\jpeg62.dll into the application's DLL first whenever the application is launched. Thus, if an application ships
install directory to accelerate it. with jpeg62.dll, jpeg7.dll, or jpeg8.dll, then back up the application's
version of this DLL and copy c:\libjpeg-turbo\bin\jpeg*.dll into the
application's install directory to accelerate it.
The version of jpeg62.dll distributed in the libjpeg-turbo SDK requires the The version of the libjpeg-turbo DLL distributed with the "official"
Visual C++ 2008 C run time DLL (msvcr90.dll). This library ships with more libjpeg-turbo SDK requires the Visual C++ 2008 C run time DLL (msvcr90.dll).
recent versions of Windows, but users of older versions can obtain it from the msvcr90.dll ships with more recent versions of Windows, but users of older
Visual C++ 2008 Redistributable Package, which is available as a free download Windows releases can obtain it from the Visual C++ 2008 Redistributable
from Microsoft's web site. Package, which is available as a free download from Microsoft's web site.
NOTE: Features of libjpeg which require passing a C run time structure, such NOTE: Features of libjpeg which require passing a C run time structure, such
as a file handle, from an application to libjpeg will probably not work with as a file handle, from an application to libjpeg will probably not work with
the distributed version of jpeg62.dll unless the application is also built to the "official" version of the libjpeg-turbo DLL unless the application is also
use the Visual C++ 2008 C run time DLL. In particular, this affects built to use the Visual C++ 2008 C run time DLL. In particular, this affects
jpeg_stdio_dest() and jpeg_stdio_src(). jpeg_stdio_dest() and jpeg_stdio_src().
Mac applications typically embed their own copies of libjpeg.62.dylib inside Mac applications typically embed their own copies of the libjpeg dylib inside
the (hidden) application bundle, so it is not possible to globally replace the (hidden) application bundle, so it is not possible to globally replace
libjpeg on OS X systems. If an application uses a shared library version of libjpeg on OS X systems. If an application uses a shared library version of
libjpeg, then it may be possible to replace the application's version of it. libjpeg, then it may be possible to replace the application's version of it.
This would generally involve copying libjpeg.62.dylib into the appropriate This would generally involve copying libjpeg.*.dylib from libjpeg-turbo into
place in the application bundle and using install_name_tool to repoint the the appropriate place in the application bundle and using install_name_tool to
dylib to the new directory. This requires an advanced knowledge of OS X and repoint the dylib to the new directory. This requires an advanced knowledge of
would not survive an upgrade or a re-install of the application. Thus, it is OS X and would not survive an upgrade or a re-install of the application.
not recommended for most users. Thus, it is not recommended for most users.
======================= =======================
Replacing TurboJPEG/IPP Replacing TurboJPEG/IPP
@@ -132,8 +134,8 @@ Using libjpeg-turbo in Your Own Programs
For the most part, libjpeg-turbo should work identically to libjpeg, so in For the most part, libjpeg-turbo should work identically to libjpeg, so in
most cases, an application can be built against libjpeg and then run against most cases, an application can be built against libjpeg and then run against
libjpeg-turbo. On Unix systems, you can build against libjpeg-turbo instead libjpeg-turbo. On Unix systems (including Cygwin), you can build against
of libjpeg by setting libjpeg-turbo instead of libjpeg by setting
CPATH=/opt/libjpeg-turbo/include CPATH=/opt/libjpeg-turbo/include
and and
@@ -142,12 +144,6 @@ of libjpeg by setting
({lib} = lib32 or lib64, depending on whether you are building a 32-bit or a ({lib} = lib32 or lib64, depending on whether you are building a 32-bit or a
64-bit application.) 64-bit application.)
If using Cygwin, then set
CPATH=/cygdrive/c/libjpeg-turbo-gcc[64]/include
and
LIBRARY_PATH=/cygdrive/c/libjpeg-turbo-gcc[64]/lib
If using MinGW, then set If using MinGW, then set
CPATH=/c/libjpeg-turbo-gcc[64]/include CPATH=/c/libjpeg-turbo-gcc[64]/include
@@ -174,8 +170,8 @@ line (this also works on Linux and Solaris.)
To build Visual C++ applications using libjpeg-turbo, add To build Visual C++ applications using libjpeg-turbo, add
c:\libjpeg-turbo[64]\include to your system or user INCLUDE environment c:\libjpeg-turbo[64]\include to your system or user INCLUDE environment
variable and c:\libjpeg-turbo[64]\lib to your system or user LIB environment variable and c:\libjpeg-turbo[64]\lib to your system or user LIB environment
variable, and then link against either jpeg.lib (to use jpeg62.dll) or variable, and then link against either jpeg.lib (to use the DLL version of
jpeg-static.lib (to use the static version of libjpeg-turbo.) libjpeg-turbo) or jpeg-static.lib (to use the static version of libjpeg-turbo.)
===================== =====================
Colorspace Extensions Colorspace Extensions
@@ -229,11 +225,12 @@ until/unless the newer libjpeg code bases garner more community support and
involvement and until/unless we have some notion of whether future libjpeg involvement and until/unless we have some notion of whether future libjpeg
releases will also be backward-incompatible. releases will also be backward-incompatible.
By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, you can By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, or an
build a version of libjpeg-turbo which emulates the libjpeg v7 or v8b API/ABI, argument of -DWITH_JPEG7=1 or -DWITH_JPEG8=1 to cmake, you can build a version
so that programs which are built against libjpeg v7 or v8 can be run with of libjpeg-turbo which emulates the libjpeg v7 or v8b API/ABI, so that programs
libjpeg-turbo. The following section describes which libjpeg v7+ features are which are built against libjpeg v7 or v8 can be run with libjpeg-turbo. The
supported and which aren't. following section describes which libjpeg v7+ features are supported and which
aren't.
libjpeg v7 and v8 Features: libjpeg v7 and v8 Features:
--------------------------- ---------------------------