资源简介
libjpeg libjpeg-turbo 2.0.5编译好的win32+x64的debug和release库包括了static-lib库和dll
代码片段和文件信息
/*
* Copyright (C)2011-2012 2014-2015 2017 2019 D. R. Commander.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the libjpeg-turbo Project nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
* CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This program demonstrates how to compress decompress and transform JPEG
* images using the TurboJPEG C API
*/
#include
#include
#include
#include
#include
#ifdef _WIN32
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
#define THROW(action message) { \
printf(“ERROR in line %d while %s:\n%s\n“ __LINE__ action message); \
retval = -1; goto bailout; \
}
#define THROW_TJ(action) THROW(action tjGetErrorStr2(tjInstance))
#define THROW_UNIX(action) THROW(action strerror(errno))
#define DEFAULT_SUBSAMP TJSAMP_444
#define DEFAULT_QUALITY 95
const char *subsampName[TJ_NUMSAMP] = {
“4:4:4“ “4:2:2“ “4:2:0“ “Grayscale“ “4:4:0“ “4:1:1“
};
const char *colorspaceName[TJ_NUMCS] = {
“RGB“ “YCbCr“ “GRAY“ “CMYK“ “YCCK“
};
tjscalingfactor *scalingFactors = NULL;
int numScalingFactors = 0;
/* DCT filter example. This produces a negative of the image. */
static int customFilter(short *coeffs tjregion arrayRegion
tjregion planeRegion int componentIndex
int transformIndex tjtransform *transform)
{
int i;
for (i = 0; i < arrayRegion.w * arrayRegion.h; i++)
coeffs[i] = -coeffs[i];
return 0;
}
static void usage(char *programName)
{
int i;
printf(“\nUSAGE: %s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 87040 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\cjpeg.exe
文件 82944 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\djpeg.exe
文件 621568 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\jpeg8.dll
文件 1142784 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\jpeg8.pdb
文件 73216 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\jpegtran.exe
文件 888320 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\rdjpgcom.exe
文件 1070080 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\tjbench.exe
文件 1705472 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\turbojpeg.dll
文件 7811072 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\turbojpeg.pdb
文件 889856 2020-08-03 11:00 libjpeg-turbo\bin\Win32\Debug\wrjpgcom.exe
文件 36352 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\cjpeg.exe
文件 29184 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\djpeg.exe
文件 342016 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\jpeg8.dll
文件 1142784 2020-08-03 10:48 libjpeg-turbo\bin\Win32\Release\jpeg8.pdb
文件 27648 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\jpegtran.exe
文件 115200 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\rdjpgcom.exe
文件 171520 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\tjbench.exe
文件 520192 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\turbojpeg.dll
文件 7811072 2020-08-03 10:48 libjpeg-turbo\bin\Win32\Release\turbojpeg.pdb
文件 115712 2020-08-03 10:59 libjpeg-turbo\bin\Win32\Release\wrjpgcom.exe
文件 112640 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\cjpeg.exe
文件 105472 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\djpeg.exe
文件 824320 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\jpeg8.dll
文件 1126400 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\jpeg8.pdb
文件 98304 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\jpegtran.exe
文件 1142272 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\rdjpgcom.exe
文件 1367552 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\tjbench.exe
文件 2224128 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\turbojpeg.dll
文件 7655424 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\turbojpeg.pdb
文件 1144832 2020-08-03 11:00 libjpeg-turbo\bin\x64\Debug\wrjpgcom.exe
............此处省略60个文件信息
评论
共有 条评论