?? readme
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -