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

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

?? wrjpgcom.c

?? JPEG source code converts the image into compressed format
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 * wrjpgcom.c
 *
 * Copyright (C) 1994-1997, Thomas G. Lane.
 * This file is part of the Independent JPEG Group's software.
 * For conditions of distribution and use, see the accompanying README file.
 *
 * This file contains a very simple stand-alone application that inserts
 * user-supplied text as a COM (comment) marker in a JFIF file.
 * This may be useful as an example of the minimum logic needed to parse
 * JPEG markers.
 */

#define JPEG_CJPEG_DJPEG	/* to get the command-line config symbols */
#include "jinclude.h"		/* get auto-config symbols, <stdio.h> */

#ifndef HAVE_STDLIB_H		/* <stdlib.h> should declare malloc() */
extern void * malloc ();
#endif
#include <ctype.h>		/* to declare isupper(), tolower() */
#ifdef USE_SETMODE
#include <fcntl.h>		/* to declare setmode()'s parameter macros */
/* If you have setmode() but not <io.h>, just delete this line: */
#include <io.h>			/* to declare setmode() */
#endif

#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
#ifdef __MWERKS__
#include <SIOUX.h>              /* Metrowerks needs this */
#include <console.h>		/* ... and this */
#endif
#ifdef THINK_C
#include <console.h>		/* Think declares it here */
#endif
#endif

#ifdef DONT_USE_B_MODE		/* define mode parameters for fopen() */
#define READ_BINARY	"r"
#define WRITE_BINARY	"w"
#else
#ifdef VMS			/* VMS is very nonstandard */
#define READ_BINARY	"rb", "ctx=stm"
#define WRITE_BINARY	"wb", "ctx=stm"
#else				/* standard ANSI-compliant case */
#define READ_BINARY	"rb"
#define WRITE_BINARY	"wb"
#endif
#endif

#ifndef EXIT_FAILURE		/* define exit() codes if not provided */
#define EXIT_FAILURE  1
#endif
#ifndef EXIT_SUCCESS
#ifdef VMS
#define EXIT_SUCCESS  1		/* VMS is very nonstandard */
#else
#define EXIT_SUCCESS  0
#endif
#endif

/* Reduce this value if your malloc() can't allocate blocks up to 64K.
 * On DOS, compiling in large model is usually a better solution.
 */

#ifndef MAX_COM_LENGTH
#define MAX_COM_LENGTH 65000L	/* must be <= 65533 in any case */
#endif


/*
 * These macros are used to read the input file and write the output file.
 * To reuse this code in another application, you might need to change these.
 */

static FILE * infile;		/* input JPEG file */

/* Return next input byte, or EOF if no more */
#define NEXTBYTE()  getc(infile)

static FILE * outfile;		/* output JPEG file */

/* Emit an output byte */
#define PUTBYTE(x)  putc((x), outfile)


/* Error exit handler */
#define ERREXIT(msg)  (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE))


/* Read one byte, testing for EOF */
static int
read_1_byte (void)
{
  int c;

  c = NEXTBYTE();
  if (c == EOF)
    ERREXIT("Premature EOF in JPEG file");
  return c;
}

/* Read 2 bytes, convert to unsigned int */
/* All 2-byte quantities in JPEG markers are MSB first */
static unsigned int
read_2_bytes (void)
{
  int c1, c2;

  c1 = NEXTBYTE();
  if (c1 == EOF)
    ERREXIT("Premature EOF in JPEG file");
  c2 = NEXTBYTE();
  if (c2 == EOF)
    ERREXIT("Premature EOF in JPEG file");
  return (((unsigned int) c1) << 8) + ((unsigned int) c2);
}


/* Routines to write data to output file */

static void
write_1_byte (int c)
{
  PUTBYTE(c);
}

static void
write_2_bytes (unsigned int val)
{
  PUTBYTE((val >> 8) & 0xFF);
  PUTBYTE(val & 0xFF);
}

static void
write_marker (int marker)
{
  PUTBYTE(0xFF);
  PUTBYTE(marker);
}

static void
copy_rest_of_file (void)
{
  int c;

  while ((c = NEXTBYTE()) != EOF)
    PUTBYTE(c);
}


/*
 * JPEG markers consist of one or more 0xFF bytes, followed by a marker
 * code byte (which is not an FF).  Here are the marker codes of interest
 * in this program.  (See jdmarker.c for a more complete list.)
 */

#define M_SOF0  0xC0		/* Start Of Frame N */
#define M_SOF1  0xC1		/* N indicates which compression process */
#define M_SOF2  0xC2		/* Only SOF0-SOF2 are now in common use */
#define M_SOF3  0xC3
#define M_SOF5  0xC5		/* NB: codes C4 and CC are NOT SOF markers */
#define M_SOF6  0xC6
#define M_SOF7  0xC7
#define M_SOF9  0xC9
#define M_SOF10 0xCA
#define M_SOF11 0xCB
#define M_SOF13 0xCD
#define M_SOF14 0xCE
#define M_SOF15 0xCF
#define M_SOI   0xD8		/* Start Of Image (beginning of datastream) */
#define M_EOI   0xD9		/* End Of Image (end of datastream) */
#define M_SOS   0xDA		/* Start Of Scan (begins compressed data) */
#define M_COM   0xFE		/* COMment */


/*
 * Find the next JPEG marker and return its marker code.
 * We expect at least one FF byte, possibly more if the compressor used FFs
 * to pad the file.  (Padding FFs will NOT be replicated in the output file.)
 * There could also be non-FF garbage between markers.  The treatment of such
 * garbage is unspecified; we choose to skip over it but emit a warning msg.
 * NB: this routine must not be used after seeing SOS marker, since it will
 * not deal correctly with FF/00 sequences in the compressed image data...
 */

static int
next_marker (void)
{
  int c;
  int discarded_bytes = 0;

  /* Find 0xFF byte; count and skip any non-FFs. */
  c = read_1_byte();
  while (c != 0xFF) {
    discarded_bytes++;
    c = read_1_byte();
  }
  /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
   * are legal as pad bytes, so don't count them in discarded_bytes.
   */
  do {
    c = read_1_byte();
  } while (c == 0xFF);

  if (discarded_bytes != 0) {
    fprintf(stderr, "Warning: garbage data found in JPEG file\n");
  }

  return c;
}


/*
 * Read the initial marker, which should be SOI.
 * For a JFIF file, the first two bytes of the file should be literally
 * 0xFF M_SOI.  To be more general, we could use next_marker, but if the
 * input file weren't actually JPEG at all, next_marker might read the whole
 * file and then return a misleading error message...
 */

static int
first_marker (void)
{
  int c1, c2;

  c1 = NEXTBYTE();
  c2 = NEXTBYTE();
  if (c1 != 0xFF || c2 != M_SOI)
    ERREXIT("Not a JPEG file");
  return c2;
}


/*
 * Most types of marker are followed by a variable-length parameter segment.
 * This routine skips over the parameters for any marker we don't otherwise
 * want to process.
 * Note that we MUST skip the parameter segment explicitly in order not to
 * be fooled by 0xFF bytes that might appear within the parameter segment;
 * such bytes do NOT introduce new markers.
 */

static void
copy_variable (void)
/* Copy an unknown or uninteresting variable-length marker */
{
  unsigned int length;

  /* Get the marker parameter length count */
  length = read_2_bytes();
  write_2_bytes(length);
  /* Length includes itself, so must be at least 2 */
  if (length < 2)
    ERREXIT("Erroneous JPEG marker length");
  length -= 2;
  /* Skip over the remaining bytes */
  while (length > 0) {
    write_1_byte(read_1_byte());
    length--;
  }
}

static void
skip_variable (void)
/* Skip over an unknown or uninteresting variable-length marker */
{
  unsigned int length;

  /* Get the marker parameter length count */
  length = read_2_bytes();
  /* Length includes itself, so must be at least 2 */
  if (length < 2)
    ERREXIT("Erroneous JPEG marker length");
  length -= 2;
  /* Skip over the remaining bytes */
  while (length > 0) {
    (void) read_1_byte();
    length--;
  }
}


/*
 * Parse the marker stream until SOFn or EOI is seen;
 * copy data to output, but discard COM markers unless keep_COM is true.
 */

static int
scan_JPEG_header (int keep_COM)
{
  int marker;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线看国产一区| 《视频一区视频二区| 日韩精品久久久久久| 欧亚洲嫩模精品一区三区| 亚洲欧美视频在线观看视频| 91精品办公室少妇高潮对白| 亚洲精品第1页| 日韩欧美国产三级电影视频| 国产91综合一区在线观看| 亚洲一区二区三区中文字幕在线| 欧美日韩电影在线播放| 国产麻豆视频精品| 亚洲精品写真福利| www日韩大片| 国产成人免费视频网站高清观看视频 | 一区二区三区日韩精品视频| 777午夜精品视频在线播放| 狠狠色狠狠色综合系列| 亚洲综合一区二区| 欧美日韩精品三区| 99国产精品国产精品毛片| 美女mm1313爽爽久久久蜜臀| 久久精品水蜜桃av综合天堂| 亚洲国产视频一区| 91精品国产综合久久精品app| 国内成+人亚洲+欧美+综合在线| 亚洲小说欧美激情另类| 国产女人aaa级久久久级| 精品久久99ma| 欧美精品一区二区三区久久久 | 夜夜夜精品看看| 最新中文字幕一区二区三区| 久久人人爽爽爽人久久久| 日韩一区二区高清| 日韩亚洲欧美在线| 欧美久久免费观看| 欧美成人精品1314www| 日韩欧美成人一区| 久久久精品国产99久久精品芒果| 欧美一二三四在线| 久久久.com| 亚洲女人小视频在线观看| 亚洲六月丁香色婷婷综合久久| 欧美一区在线视频| 久久综合狠狠综合久久激情| 欧美激情中文字幕| 亚洲日本青草视频在线怡红院| 亚洲综合视频网| 全部av―极品视觉盛宴亚洲| 激情深爱一区二区| 97se亚洲国产综合自在线不卡| 欧美性生活一区| 精品久久国产97色综合| 亚洲欧洲中文日韩久久av乱码| 天天亚洲美女在线视频| 国产尤物一区二区| 在线视频国内自拍亚洲视频| 2023国产精品视频| 亚洲一区二区三区在线播放| 精品一区二区在线看| 欧美亚洲动漫精品| 久久网站热最新地址| 午夜视频一区二区| 成人开心网精品视频| 欧美zozozo| 蜜桃一区二区三区在线| 91高清视频免费看| 亚洲色欲色欲www| 国产电影精品久久禁18| 欧美日韩亚洲丝袜制服| 国产精品国产三级国产有无不卡| 久久国产精品一区二区| 欧美老人xxxx18| 石原莉奈一区二区三区在线观看 | 久久国产精品第一页| 欧洲人成人精品| 亚洲国产一区视频| 欧美性大战久久久久久久蜜臀| 国产精品久久久久7777按摩| 国产在线精品一区二区不卡了| 制服.丝袜.亚洲.中文.综合 | 爽好久久久欧美精品| 欧美在线观看18| 午夜精品一区二区三区电影天堂| 欧美日韩一区三区| 久久99热国产| 中文字幕精品一区二区三区精品| 成人福利视频网站| 国产在线一区二区综合免费视频| 色综合久久九月婷婷色综合| 夜夜精品浪潮av一区二区三区| 欧美午夜精品电影| 久久丁香综合五月国产三级网站| 26uuu精品一区二区在线观看| 国产成人午夜片在线观看高清观看| 亚洲欧洲av另类| 精品视频123区在线观看| 免费精品视频最新在线| 中文字幕中文字幕在线一区| 色婷婷综合久久久久中文一区二区 | 91在线观看美女| 免费精品视频最新在线| 亚洲日本在线a| 久久亚洲精华国产精华液 | 中文字幕亚洲不卡| 欧美大片顶级少妇| 欧美日本一道本在线视频| 成人免费视频app| 天天爽夜夜爽夜夜爽精品视频| 国产精品成人免费| 久久久噜噜噜久久人人看| 91精品欧美一区二区三区综合在| 懂色一区二区三区免费观看| 激情伊人五月天久久综合| 日韩va亚洲va欧美va久久| 夜夜嗨av一区二区三区| 中文字幕日韩欧美一区二区三区| 日韩欧美亚洲另类制服综合在线 | 99热精品一区二区| 风间由美一区二区av101| 国产中文一区二区三区| 久久99久久精品欧美| 蜜桃精品视频在线观看| 精品一区二区免费视频| 国产一区二区福利视频| 国产美女精品在线| 成人免费视频网站在线观看| 国产成人av在线影院| 波多野结衣亚洲一区| 91看片淫黄大片一级| 欧美日韩国产不卡| 日韩欧美中文字幕公布| 久久久九九九九| 国产精品天干天干在线综合| 亚洲影视资源网| 国产精品一区久久久久| 91丨九色丨尤物| 欧美sm极限捆绑bd| 一区二区三区在线观看欧美| 免费观看一级特黄欧美大片| 国产99一区视频免费| 欧美午夜电影网| 国产欧美一区二区在线观看| 亚洲制服丝袜av| 色哟哟一区二区| 久久久久久亚洲综合| 五月综合激情婷婷六月色窝| 亚洲在线视频网站| 国产精品亚洲а∨天堂免在线| 欧美三级资源在线| 1区2区3区欧美| 九一久久久久久| 欧美一区二区久久| 亚洲美女偷拍久久| 97久久精品人人做人人爽50路 | 欧美日韩免费观看一区二区三区| 日韩欧美高清一区| 欧美日本在线看| 久久精品一二三| 国产制服丝袜一区| 精品福利二区三区| 国产麻豆成人精品| 久久品道一品道久久精品| 免费在线看成人av| 91精品中文字幕一区二区三区| 樱花影视一区二区| 欧美在线观看视频在线| 日日夜夜免费精品视频| 67194成人在线观看| 石原莉奈在线亚洲三区| 精品国产一区二区亚洲人成毛片| 青青青伊人色综合久久| 亚洲精品在线免费播放| 国产91精品免费| 亚洲免费在线看| 欧美性色黄大片| 极品美女销魂一区二区三区| 亚洲国产精品精华液2区45| 色综合久久综合中文综合网| 午夜一区二区三区在线观看| 亚洲精品在线三区| 欧美性色黄大片手机版| 福利一区二区在线| 日本伊人色综合网| 亚洲乱码国产乱码精品精98午夜| 欧美妇女性影城| 99久久亚洲一区二区三区青草| 五月激情丁香一区二区三区| 久久精品亚洲一区二区三区浴池| 91国产福利在线| 99国产精品久久久久| 久久精品国产77777蜜臀| 亚洲国产日韩一区二区| 国产精品污www在线观看| 日韩女优av电影在线观看| 色欧美日韩亚洲| 欧美亚洲一区二区在线观看| 成人性生交大合| 成人免费毛片片v| 国产成人午夜精品5599|