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

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

?? example.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
 * assume that we do not intend to put the whole image into an in-memory
 * buffer, but to send it line-by-line someplace else.  We need a one-
 * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG
 * memory manager allocate it for us.  This approach is actually quite useful
 * because we don't need to remember to deallocate the buffer separately: it
 * will go away automatically when the JPEG object is cleaned up.
 */


/*
 * ERROR HANDLING:
 *
 * The JPEG library's standard error handler (jerror.c) is divided into
 * several "methods" which you can override individually.  This lets you
 * adjust the behavior without duplicating a lot of code, which you might
 * have to update with each future release.
 *
 * Our example here shows how to override the "error_exit" method so that
 * control is returned to the library's caller when a fatal error occurs,
 * rather than calling exit() as the standard error_exit method does.
 *
 * We use C's setjmp/longjmp facility to return control.  This means that the
 * routine which calls the JPEG library must first execute a setjmp() call to
 * establish the return point.  We want the replacement error_exit to do a
 * longjmp().  But we need to make the setjmp buffer accessible to the
 * error_exit routine.  To do this, we make a private extension of the
 * standard JPEG error handler object.  (If we were using C++, we'd say we
 * were making a subclass of the regular error handler.)
 *
 * Here's the extended error handler struct:
 */

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;

/*
 * Here's the routine that will replace the standard error_exit method:
 */

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);
}


/*
 * Sample routine for JPEG decompression.  We assume that the source file name
 * is passed in.  We want to return 1 on success, 0 on error.
 */


GLOBAL(int)
read_JPEG_file (char * filename)
{
  /* This struct contains the JPEG decompression parameters and pointers to
   * working space (which is allocated as needed by the JPEG library).
   */
  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 */
  FILE * infile;		/* source file */
  JSAMPARRAY buffer;		/* Output row buffer */
  int row_stride;		/* physical row width in output buffer */

  /* In this example we want to open the input file before doing anything else,
   * so that the setjmp() error recovery below can assume the file is open.
   * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
   * requires it in order to read binary files.
   */

  if ((infile = fopen(filename, "rb")) == NULL) {
    fprintf(stderr, "can't open %s\n", filename);
    return 0;
  }

  /* Step 1: allocate and initialize JPEG decompression object */

  /* We set up the normal JPEG error routines, then override error_exit. */
  cinfo.err = jpeg_std_error(&jerr.pub);
  jerr.pub.error_exit = my_error_exit;
  /* Establish the setjmp return context for my_error_exit to use. */
  if (setjmp(jerr.setjmp_buffer)) {
    /* If we get here, the JPEG code has signaled an error.
     * We need to clean up the JPEG object, close the input file, and return.
     */
    jpeg_destroy_decompress(&cinfo);
    fclose(infile);
    return 0;
  }
  /* Now we can initialize the JPEG decompression object. */
  jpeg_create_decompress(&cinfo);

  /* Step 2: specify data source (eg, a file) */

  jpeg_stdio_src(&cinfo, infile);

  /* Step 3: read file parameters with jpeg_read_header() */

  (void) jpeg_read_header(&cinfo, TRUE);
  /* We can ignore the return value from jpeg_read_header since
   *   (a) suspension is not possible with the stdio data source, and
   *   (b) we passed TRUE to reject a tables-only JPEG file as an error.
   * See libjpeg.doc for more info.
   */

  /* Step 4: set parameters for decompression */

  /* In this example, we don't need to change any of the defaults set by
   * jpeg_read_header(), so we do nothing here.
   */

  /* Step 5: Start decompressor */

  (void) jpeg_start_decompress(&cinfo);
  /* We can ignore the return value since suspension is not possible
   * with the stdio data source.
   */

  /* We may need to do some setup of our own at this point before reading
   * the data.  After jpeg_start_decompress() we have the correct scaled
   * output image dimensions available, as well as the output colormap
   * if we asked for color quantization.
   * In this example, we need to make an output work buffer of the right size.
   */ 
  /* 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);

  /* Step 6: while (scan lines remain to be read) */
  /*           jpeg_read_scanlines(...); */

  /* Here we use the library's state variable cinfo.output_scanline as the
   * loop counter, so that we don't have to keep track ourselves.
   */
  while (cinfo.output_scanline < cinfo.output_height) {
    /* jpeg_read_scanlines expects an array of pointers to scanlines.
     * Here the array is only one element long, but you could ask for
     * more than one scanline at a time if that's more convenient.
     */
    (void) jpeg_read_scanlines(&cinfo, buffer, 1);
    /* Assume put_scanline_someplace wants a pointer and sample count. */
    put_scanline_someplace(buffer[0], row_stride);
  }

  /* Step 7: Finish decompression */

  (void) jpeg_finish_decompress(&cinfo);
  /* We can ignore the return value since suspension is not possible
   * with the stdio data source.
   */

  /* Step 8: Release JPEG decompression object */

  /* This is an important step since it will release a good deal of memory. */
  jpeg_destroy_decompress(&cinfo);

  /* After finish_decompress, we can close the input file.
   * Here we postpone it until after no more JPEG errors are possible,
   * so as to simplify the setjmp error logic above.  (Actually, I don't
   * think that jpeg_destroy can do an error exit, but why assume anything...)
   */
  fclose(infile);

  /* At this point you may want to check to see whether any corrupt-data
   * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
   */

  /* And we're done! */
  return 1;
}


/*
 * SOME FINE POINTS:
 *
 * In the above code, we ignored the return value of jpeg_read_scanlines,
 * which is the number of scanlines actually read.  We could get away with
 * this because we asked for only one line at a time and we weren't using
 * a suspending data source.  See libjpeg.doc for more info.
 *
 * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress();
 * we should have done it beforehand to ensure that the space would be
 * counted against the JPEG max_memory setting.  In some systems the above
 * code would risk an out-of-memory error.  However, in general we don't
 * know the output image dimensions before jpeg_start_decompress(), unless we
 * call jpeg_calc_output_dimensions().  See libjpeg.doc for more about this.
 *
 * Scanlines are returned in the same order as they appear in the JPEG file,
 * which is standardly top-to-bottom.  If you must emit data bottom-to-top,
 * you can use one of the virtual arrays provided by the JPEG memory manager
 * to invert the data.  See wrbmp.c for an example.
 *
 * As with compression, some operating modes may require temporary files.
 * On some systems you may need to set up a signal handler to ensure that
 * temporary files are deleted if the program is interrupted.  See libjpeg.doc.
 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日欢夜夜爽一区| 高清久久久久久| 欧美一区二区成人6969| 国产精品白丝jk白祙喷水网站| 久久一区二区三区国产精品| 成人网男人的天堂| 日日夜夜精品视频天天综合网| www久久精品| 欧美日韩精品一区二区天天拍小说| 免费在线视频一区| 国产精品精品国产色婷婷| 欧美va亚洲va| 日韩美女一区二区三区四区| aaa欧美色吧激情视频| 久久99精品久久久| 日韩精品一二三四| 日韩精品乱码av一区二区| 亚洲女与黑人做爰| 自拍偷拍亚洲欧美日韩| 久久久高清一区二区三区| 欧美一激情一区二区三区| 欧美一a一片一级一片| 日本电影亚洲天堂一区| 日本道精品一区二区三区 | 欧美日韩一区二区三区免费看 | 另类的小说在线视频另类成人小视频在线 | 国产很黄免费观看久久| 免费人成黄页网站在线一区二区| 一区二区免费看| 日日噜噜夜夜狠狠视频欧美人| 男人操女人的视频在线观看欧美| 亚洲综合色自拍一区| 亚洲一二三专区| 午夜影院在线观看欧美| 午夜精品在线视频一区| 日韩精品每日更新| 国产精品亚洲第一| 99精品在线免费| 538在线一区二区精品国产| 日韩一区二区在线观看视频播放| 欧美成人性战久久| 国产亚洲欧美中文| 中文字幕一区二区在线观看| 国产午夜精品久久久久久免费视| 国产日本欧美一区二区| 亚洲男女一区二区三区| 日本成人在线看| 成人一区二区三区视频在线观看| 欧美中文字幕久久| 欧美国产视频在线| 美女脱光内衣内裤视频久久网站| proumb性欧美在线观看| 欧美videofree性高清杂交| 夜夜精品浪潮av一区二区三区| 国内精品免费**视频| 欧美三区在线观看| 国产精品嫩草久久久久| 国产美女精品人人做人人爽| 欧美日韩黄色一区二区| 亚洲四区在线观看| 岛国精品在线播放| 久久久亚洲高清| 九九视频精品免费| 欧美不卡激情三级在线观看| 日韩成人免费看| 日韩欧美第一区| 精品在线播放免费| 日韩一区二区三区视频在线| 五月天精品一区二区三区| 欧美久久婷婷综合色| 视频一区二区三区入口| 91.com视频| 国产在线精品一区二区| 中日韩av电影| 在线日韩一区二区| 免费在线一区观看| 久久久久久电影| 91久久精品一区二区三区| 亚洲综合视频网| 337p粉嫩大胆色噜噜噜噜亚洲| 国产成人99久久亚洲综合精品| 国产精品美女视频| 91成人免费电影| 免费看精品久久片| 国产精品亲子乱子伦xxxx裸| 欧美日韩久久不卡| 国产69精品久久777的优势| 亚洲欧洲av色图| 精品久久五月天| 欧美日韩在线免费视频| 国产成人欧美日韩在线电影| 亚洲国产精品人人做人人爽| 久久久不卡网国产精品二区| 欧美视频一二三区| 在线日韩av片| caoporn国产精品| 精品一二三四区| 久久91精品久久久久久秒播 | 国产精品美女久久久久aⅴ| 日韩一区二区影院| 欧美午夜在线一二页| 99国产精品久| 99re66热这里只有精品3直播| 另类成人小视频在线| 青娱乐精品在线视频| 亚洲国产日韩一级| 亚洲欧美激情在线| 亚洲少妇30p| 1区2区3区欧美| 中文字幕在线观看一区二区| 久久久久成人黄色影片| 2021国产精品久久精品| 欧美电影免费观看完整版| 欧美精品一卡二卡| 91精品国产综合久久久蜜臀粉嫩| 欧美日本乱大交xxxxx| 91麻豆精品国产无毒不卡在线观看 | 亚洲欧美色一区| 亚洲国产综合色| 九色综合国产一区二区三区| 激情图片小说一区| 99久久久精品| 欧美一级欧美一级在线播放| 精品国产一区二区三区忘忧草| 国产亚洲欧洲997久久综合| 国产精品欧美精品| 亚洲精品自拍动漫在线| 欧亚洲嫩模精品一区三区| 欧美电影免费观看高清完整版 | 日韩中文字幕一区二区三区| 美国毛片一区二区| 99久久国产综合精品色伊| 欧美日韩一区久久| 国产精品污www在线观看| 亚洲午夜精品网| 91国偷自产一区二区开放时间| 精品三级av在线| 国产精品影音先锋| 3d动漫精品啪啪一区二区竹菊 | av在线免费不卡| 久久你懂得1024| 激情综合色播五月| 777久久久精品| 亚洲国产精品影院| 欧美三级视频在线观看| 日韩精品乱码免费| 日韩免费看的电影| 国产不卡在线一区| 国产高清在线观看免费不卡| 91精品国产aⅴ一区二区| 蜜臂av日日欢夜夜爽一区| 欧美韩国日本不卡| 欧美日韩免费一区二区三区| 三级久久三级久久久| 久久女同精品一区二区| 91视频在线看| 无码av免费一区二区三区试看| 欧美日韩成人综合在线一区二区| 麻豆91免费观看| 亚洲男女毛片无遮挡| 欧美一卡在线观看| 粉嫩欧美一区二区三区高清影视| 樱花影视一区二区| 久久亚洲精品小早川怜子| 91久久久免费一区二区| 丝袜亚洲精品中文字幕一区| 国产欧美一区二区精品秋霞影院 | 色婷婷久久久综合中文字幕| 麻豆极品一区二区三区| 国产精品嫩草影院av蜜臀| 日韩欧美电影一二三| 在线观看视频91| 国产综合色在线视频区| 亚洲免费高清视频在线| 精品对白一区国产伦| 欧美日韩国产中文| 精品视频999| 91福利精品视频| 粉嫩久久99精品久久久久久夜 | 欧美日韩在线精品一区二区三区激情| 成人精品视频一区二区三区| a在线播放不卡| 91香蕉视频污在线| 久久99最新地址| 无码av中文一区二区三区桃花岛| 国产精品视频一二三区| 久久综合网色—综合色88| 91精品综合久久久久久| 在线影院国内精品| jvid福利写真一区二区三区| 国产91丝袜在线播放0| 国内精品视频666| 国产美女在线精品| 国产美女av一区二区三区| 久久av中文字幕片| 国产精品18久久久久久久久| 国产成人综合在线| 国产福利一区二区三区视频| 大胆欧美人体老妇| 成人动漫av在线|