readme

来自「DigitalImageProcessing_base_on_Matlab 基」· 代码 · 共 49 行

TXT
49
字号
Interface routine to IJG's JPEG Software

RUNNING EXAMPLE PROGRAM

This software follows the ANSI C standard, so it should be portable to 
different platforms. It requires that you first compile the libraries
in the directory jpeg_ansi_lib. This can be done on most standard
unix platforms by simply typing "make" in the jpeg_ansi_lib directory.

Once you have compiled the libraries, you can compile a simple
example program by typing "make sample" in this directory.
This program will read an jpeg image, interpolate it by a factor
of 2, and write it out as a jpeg image.


GENERAL USAGE

The data structure storing image is JPG_img, which must be allocated 
externally. This interface only allocates/frees memory for storing mono/color
image pixels.

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

There are four routines in jpeg.c: write_JPEG, read_JPEG, free_JPEG, and
get_JPEG

write_JPEG: write image out to a file which must be opened before call.
            Beside file pointer and image data structure, you could specify
            quality and smooth. Quality controls quality of result with 
            integer range from 5 to 95, suggested value is 95. Smooth 
            controls smoothing for palettized images, with integer value
            range from 0 to 100, where 0 means no smoothing (suggested)

read_JPEG:  read image from a file which must be opened before call.

free_JPEG:  Frees memory allocated by read_JPEG 

free_JPEG:  Frees memory allocated by read_JPEG 

get_JPEG:   Allocates memory for JPEG_img structure

⌨️ 快捷键说明

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