jcomapi.c

来自「在ecos 下mingui 的移植开发」· C语言 代码 · 共 55 行

C
55
字号
#define JPEG_INTERNALS#include "jpeglib.h"GLOBAL(void)jpeg_abort (j_common_ptr cinfo){  int pool;  /* Releasing pools in reverse order might help avoid fragmentation   * with some (brain-damaged) malloc libraries.   */  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {    (*cinfo->mem->free_pool) (cinfo, pool);  }  /* Reset overall state for possible reuse of object */  cinfo->global_state = (cinfo->is_decompressor ? DSTATE_START : CSTATE_START);}GLOBAL(void)jpeg_destroy (j_common_ptr cinfo){  /* We need only tell the memory manager to release everything. */  /* NB: mem pointer is NULL if memory mgr failed to initialize. */  if (cinfo->mem != NULL)    (*cinfo->mem->self_destruct) (cinfo);  cinfo->mem = NULL;		/* be safe if jpeg_destroy is called twice */  cinfo->global_state = 0;	/* mark it destroyed */}GLOBAL(JQUANT_TBL *)jpeg_alloc_quant_table (j_common_ptr cinfo){  JQUANT_TBL *tbl;  tbl = (JQUANT_TBL *)    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));  tbl->sent_table = FALSE;	/* make sure this is false in any new table */  return tbl;}GLOBAL(JHUFF_TBL *)jpeg_alloc_huff_table (j_common_ptr cinfo){  JHUFF_TBL *tbl;  tbl = (JHUFF_TBL *)    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));  tbl->sent_table = FALSE;	/* make sure this is false in any new table */  return tbl;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?