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

📄 jpeg.h

📁 DigitalImageProcessing_base_on_Matlab 基于Matlab的数字图像处理
💻 H
字号:
/* jpeg.h - header for jpeg.c: interface for the IJG JPEG distribution */
/* This file also need to include jpeglib.h which is part of IJG JPEG  */
/* i.e. you will need set include path to IJG JPEG package             */
/*      for UNIX, you can use -I$(JPEGDIR),                            */
/*      for MAC, you need set preference - file path                   */
/* Of course, while linking, you also need to include IJG's libjpeg.a  */


struct JPEG_img
{
  int			height;
  int			width;
  char			jpeg_type;  /* 'c' = color; 'g' = graymap;  */
  unsigned char		**mono;
  unsigned char		***color;
};

int  write_JPEG(
  FILE *fout,           /* pointer to output file */
  struct JPEG_img *img, /* structure containing jpeg image */
  int quality,          /* 0<=quality<=100; controls quality of result */
                        /* larger=>better quality */ 
                        /* useful range 5<=quality<=95*/
  int smooth);          /* 0<=smooth<=100 */
                        /* controls smoothing for palettized images */
                        /* 0=>no smoothing(default) */
                        /* 10<=smooth<=30 =>enough for typical GIFs */

int  read_JPEG(
  FILE *fin,             /* pointer to input file */
  struct JPEG_img *img); /* structure containing jpeg image */


/* Frees memory allocated by read_JPEG */
void free_JPEG(struct JPEG_img *img);

/* Allocate memory for JPEG image */
void get_JPEG (struct JPEG_img *img, int height, int width, char jpeg_type);

⌨️ 快捷键说明

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