亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jpg.c

?? 在ecos 下mingui 的移植開發
?? C
?? 第 1 頁 / 共 4 頁
字號:
#include <stdio.h>#include <stdlib.h>#ifndef __ECOS#include <memory.h># include <malloc.h>#endif#include <setjmp.h>#include "jpeglib.h"#include "jpg.h"struct my_error_mgr {  struct jpeg_error_mgr pub;	/* "public" fields */  jmp_buf setjmp_buffer;	/* for return to caller */};typedef struct my_error_mgr * my_error_ptr;METHODDEF(void)my_error_exit (j_common_ptr cinfo){  /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */  my_error_ptr myerr = (my_error_ptr) cinfo->err;  /* Always display the message. */  /* We could postpone this until after returning, if we chose. */  (*cinfo->err->output_message)(cinfo);  /* Return control to the setjmp point */  longjmp(myerr->setjmp_buffer, 1);}int unpack_jpg(jpg_info_t* jinfo){    struct jpeg_decompress_struct cinfo;    /* We use our private extension JPEG error handler.     * Note that this struct must live as long as the main JPEG parameter     * struct, to avoid dangling-pointer problems.     */    struct my_error_mgr jerr;    /* More stuff */    JSAMPARRAY buffer;		/* Output row buffer */    int row_stride;		    /* physical row width in output buffer */        cinfo.err = jpeg_std_error(&jerr.pub);    jerr.pub.error_exit = my_error_exit;    jpeg_create_decompress(&cinfo);    jpeg_memory_src(&cinfo, jinfo->jpg_buffer, jinfo->jpg_buffer_length);    jpeg_read_header(&cinfo, TRUE);    jpeg_start_decompress(&cinfo);    /* JSAMPLEs per row in output buffer */    row_stride = cinfo.output_width * cinfo.output_components;    /* Make a one-row-high sample array that will go away when done with image */    buffer = (*cinfo.mem->alloc_sarray)	    ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);    jinfo->width=cinfo.output_width;    jinfo->height=cinfo.output_height;    jinfo->jpg_surface=(unsigned char*)malloc(jinfo->width*jinfo->height*3);    while (cinfo.output_scanline < cinfo.output_height) {        unsigned char* temp_src_buffer;        unsigned char* temp_des_buffer;        jpeg_read_scanlines(&cinfo, buffer, 1);        temp_src_buffer=(unsigned char*)(*buffer);        temp_des_buffer=jinfo->jpg_surface+jinfo->width*(cinfo.output_scanline-1)*3;        memcpy(temp_des_buffer,temp_src_buffer,row_stride);    }    jpeg_finish_decompress(&cinfo);    jpeg_destroy_decompress(&cinfo);    return 0;}int destroy_jpg(jpg_info_t* jinfo){    if (jinfo->jpg_surface!=NULL) {        free(jinfo->jpg_surface);    }    return 0;}#ifndef EXIT_FAILURE		/* define exit() codes if not provided */#define EXIT_FAILURE  1#endif/* * Create the message string table. * We do this from the master message list in jerror.h by re-reading * jerror.h with a suitable definition for macro JMESSAGE. * The message table is made an external symbol just in case any applications * want to refer to it directly. */#define JMESSAGE(code,string)	string ,const char * const jpeg_std_message_table[] = {#include "jpg.h"  NULL};/* * Error exit handler: must not return to caller. * * Applications may override this if they want to get control back after * an error.  Typically one would longjmp somewhere instead of exiting. * The setjmp buffer can be made a private field within an expanded error * handler object.  Note that the info needed to generate an error message * is stored in the error object, so you can generate the message now or * later, at your convenience. * You should make sure that the JPEG object is cleaned up (with jpeg_abort * or jpeg_destroy) at some point. */METHODDEF(void)error_exit (j_common_ptr cinfo){  /* Always display the message */  (*cinfo->err->output_message) (cinfo);  /* Let the memory manager delete any temp files before we die */  jpeg_destroy(cinfo);}/* * Actual output of an error or trace message. * Applications may override this method to send JPEG messages somewhere * other than stderr. */METHODDEF(void)output_message (j_common_ptr cinfo){  char buffer[JMSG_LENGTH_MAX];  /* Create the message */  (*cinfo->err->format_message) (cinfo, buffer);  /* Send it to stderr, adding a newline */  fprintf(stderr, "%s\n", buffer);}/* * Decide whether to emit a trace or warning message. * msg_level is one of: *   -1: recoverable corrupt-data warning, may want to abort. *    0: important advisory messages (always display to user). *    1: first level of tracing detail. *    2,3,...: successively more detailed tracing messages. * An application might override this method if it wanted to abort on warnings * or change the policy about which messages to display. */METHODDEF(void)emit_message (j_common_ptr cinfo, int msg_level){  struct jpeg_error_mgr * err = cinfo->err;  if (msg_level < 0) {    /* It's a warning message.  Since corrupt files may generate many warnings,     * the policy implemented here is to show only the first warning,     * unless trace_level >= 3.     */    if (err->num_warnings == 0 || err->trace_level >= 3)      (*err->output_message) (cinfo);    /* Always count warnings in num_warnings. */    err->num_warnings++;  } else {    /* It's a trace message.  Show it if trace_level >= msg_level. */    if (err->trace_level >= msg_level)      (*err->output_message) (cinfo);  }}/* * Format a message string for the most recent JPEG error or message. * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX * characters.  Note that no '\n' character is added to the string. * Few applications should need to override this method. */METHODDEF(void)format_message (j_common_ptr cinfo, char * buffer){  struct jpeg_error_mgr * err = cinfo->err;  int msg_code = err->msg_code;  const char * msgtext = NULL;  const char * msgptr;  char ch;  boolean isstring;  /* Look up message string in proper table */  if (msg_code > 0 && msg_code <= err->last_jpeg_message) {    msgtext = err->jpeg_message_table[msg_code];  } else if (err->addon_message_table != NULL &&	     msg_code >= err->first_addon_message &&	     msg_code <= err->last_addon_message) {    msgtext = err->addon_message_table[msg_code - err->first_addon_message];  }  /* Defend against bogus message number */  if (msgtext == NULL) {    err->msg_parm.i[0] = msg_code;    msgtext = err->jpeg_message_table[0];  }  /* Check for string parameter, as indicated by %s in the message text */  isstring = FALSE;  msgptr = msgtext;  while ((ch = *msgptr++) != '\0') {    if (ch == '%') {      if (*msgptr == 's') isstring = TRUE;      break;    }  }  /* Format the message into the passed buffer */  if (isstring)    sprintf(buffer, msgtext, err->msg_parm.s);  else    sprintf(buffer, msgtext,	    err->msg_parm.i[0], err->msg_parm.i[1],	    err->msg_parm.i[2], err->msg_parm.i[3],	    err->msg_parm.i[4], err->msg_parm.i[5],	    err->msg_parm.i[6], err->msg_parm.i[7]);}/* * Reset error state variables at start of a new image. * This is called during compression startup to reset trace/error * processing to default state, without losing any application-specific * method pointers.  An application might possibly want to override * this method if it has additional error processing state. */METHODDEF(void)reset_error_mgr (j_common_ptr cinfo){  cinfo->err->num_warnings = 0;  /* trace_level is not reset since it is an application-supplied parameter */  cinfo->err->msg_code = 0;	/* may be useful as a flag for "no error" */}/* * Fill in the standard error-handling methods in a jpeg_error_mgr object. * Typical call is: *	struct jpeg_compress_struct cinfo; *	struct jpeg_error_mgr err; * *	cinfo.err = jpeg_std_error(&err); * after which the application may override some of the methods. */GLOBAL(struct jpeg_error_mgr *)jpeg_std_error (struct jpeg_error_mgr * err){  err->error_exit = error_exit;  err->emit_message = emit_message;  err->output_message = output_message;  err->format_message = format_message;  err->reset_error_mgr = reset_error_mgr;  err->trace_level = 0;		/* default = no tracing */  err->num_warnings = 0;	/* no warnings emitted yet */  err->msg_code = 0;		/* may be useful as a flag for "no error" */  /* Initialize message table pointers */  err->jpeg_message_table = jpeg_std_message_table;  err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;  err->addon_message_table = NULL;  err->first_addon_message = 0;	/* for safety */  err->last_addon_message = 0;  return err;}#define JPEG_INTERNALS#include "jpegint.h"#define AM_MEMORY_MANAGER	/* we define jvirt_Xarray_control structs */#ifndef NO_GETENV#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare getenv() */extern char * getenv JPP((const char * name));#endif#endif/* * Some important notes: *   The allocation routines provided here must never return NULL. *   They should exit to error_exit if unsuccessful. * *   It's not a good idea to try to merge the sarray and barray routines, *   even though they are textually almost the same, because samples are *   usually stored as bytes while coefficients are shorts or ints.  Thus, *   in machines where byte pointers have a different representation from *   word pointers, the resulting machine code could not be the same. *//* * Many machines require storage alignment: longs must start on 4-byte * boundaries, doubles on 8-byte boundaries, etc.  On such machines, malloc() * always returns pointers that are multiples of the worst-case alignment * requirement, and we had better do so too. * There isn't any really portable way to determine the worst-case alignment * requirement.  This module assumes that the alignment requirement is * multiples of sizeof(ALIGN_TYPE). * By default, we define ALIGN_TYPE as double.  This is necessary on some * workstations (where doubles really do need 8-byte alignment) and will work * fine on nearly everything.  If your machine has lesser alignment needs, * you can save a few bytes by making ALIGN_TYPE smaller. * The only place I know of where this will NOT work is certain Macintosh * 680x0 compilers that define double as a 10-byte IEEE extended float. * Doing 10-byte alignment is counterproductive because longwords won't be * aligned well.  Put "#define ALIGN_TYPE long" in jconfig.h if you have * such a compiler. */#ifndef ALIGN_TYPE		/* so can override from jconfig.h */#define ALIGN_TYPE  double#endif/* * We allocate objects from "pools", where each pool is gotten with a single * request to jpeg_get_small() or jpeg_get_large().  There is no per-object * overhead within a pool, except for alignment padding.  Each pool has a * header with a link to the next pool of the same class. * Small and large pool headers are identical except that the latter's * link pointer must be FAR on 80x86 machines. * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE * field.  This forces the compiler to make SIZEOF(small_pool_hdr) a multiple * of the alignment requirement of ALIGN_TYPE. */typedef union small_pool_struct * small_pool_ptr;typedef union small_pool_struct {  struct {    small_pool_ptr next;	/* next in list of pools */    size_t bytes_used;		/* how many bytes already used within pool */    size_t bytes_left;		/* bytes still available in this pool */  } hdr;  ALIGN_TYPE dummy;		/* included in union to ensure alignment */} small_pool_hdr;typedef union large_pool_struct * large_pool_ptr;typedef union large_pool_struct {  struct {    large_pool_ptr next;	/* next in list of pools */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本精品一级二级| 国产婷婷色一区二区三区在线| 欧美一二区视频| 国产精品欧美极品| 日韩精品电影一区亚洲| 国产成人高清在线| 日韩亚洲欧美中文三级| 日本成人中文字幕在线视频| 白白色 亚洲乱淫| 精品av久久707| 五月婷婷另类国产| www.亚洲国产| 久久久亚洲综合| 美女视频黄 久久| 欧美天堂一区二区三区| 成人欧美一区二区三区1314| 精品一区二区三区av| 欧美精品在线观看一区二区| 自拍偷自拍亚洲精品播放| 国产一区二区三区久久久| 在线电影国产精品| 亚洲第一激情av| 91成人看片片| 一区二区三区不卡视频| 日本伦理一区二区| 亚洲最大成人综合| 一本久道中文字幕精品亚洲嫩 | 粉嫩久久99精品久久久久久夜| 这里只有精品电影| 偷偷要91色婷婷| 欧美日本一道本在线视频| 亚洲五码中文字幕| 欧美三级三级三级爽爽爽| 亚洲一二三四区| 在线观看一区二区精品视频| 亚洲最大的成人av| 欧美老女人在线| 日韩精品五月天| 欧美一区二区视频在线观看2022| 夜夜精品视频一区二区| 91视频一区二区三区| 欧美激情自拍偷拍| 国产精品一区二区三区四区| 欧美麻豆精品久久久久久| 亚洲欧美日韩电影| 色综合天天综合色综合av | 国产精品久久久久桃色tv| 国产剧情一区在线| 国产情人综合久久777777| 韩国一区二区三区| 久久婷婷色综合| 激情国产一区二区| 国产精品美女久久福利网站 | 欧美日韩国产大片| 久久91精品国产91久久小草| 欧美大肚乱孕交hd孕妇| 久久精品国产亚洲一区二区三区| 91精品国产综合久久香蕉的特点 | 亚洲国产综合视频在线观看| 国产精品毛片无遮挡高清| 成人免费精品视频| 久久青草欧美一区二区三区| 99视频一区二区三区| 久久99国产精品久久| 精品美女一区二区| 国产一区二区电影| 亚洲欧美综合色| 欧美日韩综合在线免费观看| 午夜激情一区二区三区| 欧美一区二区精品| 国产成人综合亚洲91猫咪| 国产精品久久久久婷婷二区次| 色综合久久综合网| 亚洲美女屁股眼交3| 91精品国产色综合久久久蜜香臀| 久久91精品国产91久久小草| 国产精品天美传媒| 欧美日韩高清一区二区不卡| 麻豆中文一区二区| 国产精品天天看| 欧美丰满一区二区免费视频 | 欧美一二三四区在线| 国产九九视频一区二区三区| 亚洲激情中文1区| 日韩免费视频一区二区| 日本韩国一区二区三区| 蜜臀99久久精品久久久久久软件| 久久婷婷一区二区三区| 色噜噜狠狠一区二区三区果冻| 日本不卡在线视频| 中文字幕在线不卡国产视频| 欧美肥妇毛茸茸| 成人免费观看男女羞羞视频| 日本不卡视频一二三区| 国产精品久久久爽爽爽麻豆色哟哟 | 99国产精品一区| 麻豆精品视频在线观看免费| 中文久久乱码一区二区| 欧美日韩精品三区| 天天影视涩香欲综合网| 中文字幕av一区二区三区高 | 一区二区三区在线免费观看 | 全部av―极品视觉盛宴亚洲| 亚洲免费观看在线观看| 亚洲国产另类av| 亚洲欧美另类久久久精品2019| 欧美在线播放高清精品| 91蜜桃婷婷狠狠久久综合9色| 久久精品国产亚洲一区二区三区| 亚洲免费观看在线视频| 国产欧美日韩中文久久| 欧美r级电影在线观看| 欧美日韩一区二区三区在线看| 国产一区999| 免费在线看成人av| 亚洲视频在线一区二区| 亚洲婷婷在线视频| 国产精品无遮挡| 国产亚洲精品超碰| 精品国产露脸精彩对白| 欧美一级艳片视频免费观看| 91国偷自产一区二区三区观看 | 日韩av不卡一区二区| 亚洲成人一区二区| 国产精品美女久久久久久久久 | 蜜臀av一区二区| 美国十次了思思久久精品导航| 夜夜爽夜夜爽精品视频| 亚洲精品免费电影| 亚洲欧美福利一区二区| 亚洲视频每日更新| 中文字幕日韩一区| 中文字幕亚洲视频| 国产精品久久久久四虎| 最新中文字幕一区二区三区| 国产精品国产三级国产aⅴ入口| 日韩欧美亚洲国产精品字幕久久久| 精品国产亚洲在线| www国产精品av| 久久久久国色av免费看影院| 久久久五月婷婷| 中文字幕精品在线不卡| 国产日韩欧美激情| 亚洲欧洲日韩女同| 一区二区三区四区不卡在线 | 日本高清不卡在线观看| 在线观看视频一区二区| 欧美区视频在线观看| 91麻豆精品国产自产在线观看一区 | 日韩精彩视频在线观看| 日本美女视频一区二区| 精东粉嫩av免费一区二区三区| 国产精品1024久久| 99视频一区二区三区| 日本电影欧美片| 欧美日本在线一区| 欧美久久久久久蜜桃| 欧美va亚洲va在线观看蝴蝶网| 久久久亚洲国产美女国产盗摄| 国产精品大尺度| 午夜精品福利一区二区三区av | 国产日韩亚洲欧美综合| 亚洲精品国产高清久久伦理二区| 亚洲高清中文字幕| 国产精品一线二线三线精华| 不卡的电影网站| 欧美一区2区视频在线观看| 国产亚洲一区二区三区四区| 亚洲天堂成人在线观看| 美女视频网站黄色亚洲| 色诱亚洲精品久久久久久| 欧美三区在线视频| 久久精品网站免费观看| 国产欧美日韩中文久久| 亚洲欧美电影一区二区| 精品一区二区在线看| 色哟哟一区二区| 久久久电影一区二区三区| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 粉嫩一区二区三区在线看| 欧美少妇一区二区| 国产精品网站在线播放| 免费久久99精品国产| 91色视频在线| 日韩精品中文字幕一区二区三区| 综合欧美亚洲日本| 国产美女娇喘av呻吟久久| 欧美午夜精品免费| 国产精品网曝门| 国产精品亚洲视频| 精品国精品国产| 午夜激情一区二区三区| 色8久久精品久久久久久蜜| 国产日韩视频一区二区三区| 日本不卡高清视频| 一本到不卡免费一区二区| 亚洲精品日韩专区silk| 国产成人午夜精品影院观看视频| 欧美伦理视频网站| 亚洲一区二区四区蜜桃|