⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wrsprite.h

📁 这是从一款商业嵌入式浏览器中节选出来的代码
💻 H
字号:
/* JPEG decoder 16bit output code * Copyright (C) ANT Limited 1999 -- All Rights Reserved -- Confidential * $Header: /cvs/repos/src/webimage/dll_jpeg/layers/wrsprite.h,v 1.1.4.2 2003/09/12 09:35:37 simonp Exp $ */#ifndef included_wrsprite16_h#define included_wrsprite16_h#if LAYERS_STDIO/* * The modules that use fread() and fwrite() always invoke them through * these macros.  On some systems you may need to twiddle the argument casts. * CAUTION: argument order is different from underlying functions! */#define JFREAD(file,buf,sizeofbuf)  \  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))#define JFWRITE(file,buf,sizeofbuf)  \  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))#else#define JFREAD(file,buf,sizeofbuf)  0#define JFWRITE(file,buf,sizeofbuf)  0#endif#define SIZEOF(object)	((size_t) sizeof(object))/* * Object interface for djpeg's output file encoding modules */typedef struct djpeg_dest_struct * djpeg_dest_ptr;struct djpeg_dest_struct {  /* start_output is called after jpeg_start_decompress finishes.   * The color map will be ready at this time, if one is needed.   */  JMETHOD(void, start_output, (j_decompress_ptr cinfo,			       djpeg_dest_ptr dinfo));  /* Emit the specified number of pixel rows from the buffer. */  JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,				 djpeg_dest_ptr dinfo,				 JDIMENSION rows_supplied));  /* Finish up at the end of the image. */  JMETHOD(void, finish_output, (j_decompress_ptr cinfo,				djpeg_dest_ptr dinfo));  /* Target file spec; filled in by djpeg.c after object is created. */  FILE * output_file;  /* Output pixel-row buffer.  Created by module init or start_output.   * Width is cinfo->output_width * cinfo->output_components;   * height is buffer_height.   */  JSAMPARRAY buffer;  JDIMENSION buffer_height;};/* Private version of data destination object */typedef struct{  struct djpeg_dest_struct pub;	/* public fields */  char *iobuffer;		/* fwrite's I/O buffer */  size_t buffer_width;		/* width of I/O buffer */  JDIMENSION samples_per_row;	/* JSAMPLEs per output row */  void *outfile;		/* target stream */  putdst_func putdst;         	/* Destination stream function */  getdst_func getdst;           /* Destination readback function */  seekdst_func seekdst;         /* Destination seek function */  BOOL use_16bpp;               /* 16bpp output (rather than 32bpp) */  BOOL yuv_out;                 /* 4:2:2 YUV out */  unsigned int image_offset;    /* offset of the image data in the file */  webimage_rotate rotate;       /* the rotation to apply */    unsigned int stride;        /* stride in the data in bytes */} sprite_dest_struct;typedef sprite_dest_struct *sprite_dest_ptr;#define jinit_write_sprite	jIWrSpritedjpeg_dest_ptr jinit_write_sprite JPP((j_decompress_ptr cinfo, void *userdst, void *putdst, void *seekdst, void *getdst, BOOL use_16bpp, BOOL yuv_out, int rotate));/* routines used in driver code only */void put_pixel16bpp_rows( j_decompress_ptr cinfo,                          djpeg_dest_ptr dinfo,                          JDIMENSION rows_supplied );#endif/* eof wrsprite.h */

⌨️ 快捷键说明

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