资源简介
turbo-jpeg
代码片段和文件信息
/*
* Copyright (C)2011 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.
*/
#include
#include
#include
#include
#include “cdjpeg.h“
#include
#include
#include “tjutil.h“
#include “bmp.h“
/* This duplicates the functionality of the VirtualGL bitmap library using
the components from cjpeg and djpeg */
/* Error handling (based on example in example.c) */
static char errStr[JMSG_LENGTH_MAX]=“No error“;
struct my_error_mgr
{
struct jpeg_error_mgr pub;
jmp_buf setjmp_buffer;
};
typedef struct my_error_mgr *my_error_ptr;
static void my_error_exit(j_common_ptr cinfo)
{
my_error_ptr myerr=(my_error_ptr)cinfo->err;
(*cinfo->err->output_message)(cinfo);
longjmp(myerr->setjmp_buffer 1);
}
/* based on output_message() in jerror.c */
static void my_output_message(j_common_ptr cinfo)
{
(*cinfo->err->format_message)(cinfo errStr);
}
#define _throw(m) {snprintf(errStr JMSG_LENGTH_MAX “%s“ m); \
retval=-1; goto bailout;}
#define _throwunix(m) {snprintf(errStr JMSG_LENGTH_MAX “%s\n%s“ m \
strerror(errno)); retval=-1; goto bailout;}
static void pixelconvert(unsigned char *srcbuf int srcpf int srcbottomup
unsigned char *dstbuf int dstpf int dstbottomup int w int h)
{
unsigned char *srcptr=srcbuf *srcptr2;
int srcps=tjPixelSize[srcpf];
int srcstride=srcbottomup? -w*srcps:w*srcps;
unsigned char *dstptr=
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-11-03 13:46 turbo-jpeg\
目录 0 2016-11-03 13:43 turbo-jpeg\jni\
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\
文件 31 2016-11-03 13:43 turbo-jpeg\jni\.git\HEAD
文件 373 2016-11-03 13:43 turbo-jpeg\jni\.git\config
文件 73 2016-11-03 13:42 turbo-jpeg\jni\.git\desc
目录 0 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\
文件 478 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\applypatch-msg.sample
文件 896 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\commit-msg.sample
文件 189 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\post-update.sample
文件 424 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\pre-applypatch.sample
文件 1642 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\pre-commit.sample
文件 1348 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\pre-push.sample
文件 4951 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\pre-reba
文件 1239 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\prepare-commit-msg.sample
文件 3611 2016-11-03 13:42 turbo-jpeg\jni\.git\hooks\update.sample
文件 33672 2016-11-03 13:43 turbo-jpeg\jni\.git\index
目录 0 2016-11-03 13:42 turbo-jpeg\jni\.git\info\
文件 240 2016-11-03 13:42 turbo-jpeg\jni\.git\info\exclude
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\
文件 209 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\HEAD
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\heads\
文件 209 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\heads\linaro-android
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\remotes\
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\remotes\origin\
文件 209 2016-11-03 13:43 turbo-jpeg\jni\.git\logs\refs\remotes\origin\HEAD
目录 0 2016-11-03 13:42 turbo-jpeg\jni\.git\ob
目录 0 2016-11-03 20:20 turbo-jpeg\jni\.git\ob
目录 0 2016-11-03 13:43 turbo-jpeg\jni\.git\ob
文件 34252 2016-11-03 13:43 turbo-jpeg\jni\.git\ob
............此处省略621个文件信息
- 上一篇:高仿“墨迹天气” 我页面滑动效果
- 下一篇:快餐管理系统
评论
共有 条评论