USING THE IJG JPEG LIBRARY
This file was part of the Independent JPEG Group's software:
Copyright (C) 1994-2013, Thomas G. Lane, Guido Vollbeding.
libjpeg-turbo Modifications:
Copyright (C) 2010, 2014-2018, 2020, 2022, D. R. Commander.
Copyright (C) 2015, Google, Inc.
For conditions of distribution and use, see the accompanying README.ijg file.
This file describes how to use the IJG JPEG library within an application
program. Read it if you want to write a program that uses the library.
The file example.txt provides heavily commented skeleton code for calling the
JPEG library. Also see jpeglib.h (the include file to be used by application
programs) for full details about data structures and function parameter lists.
The library source code, of course, is the ultimate reference.
Note that there have been *major* changes from the application interface
presented by IJG version 4 and earlier versions. The old design had several
inherent limitations, and it had accumulated a lot of cruft as we added
features while trying to minimize application-interface changes. We have
sacrificed backward compatibility in the version 5 rewrite, but we think the
improvements justify this.
TABLE OF CONTENTS
-----------------
Overview:
Functions provided by the library
Outline of typical usage
Basic library usage:
Data formats
Compression details
Decompression details
Partial image decompression
Mechanics of usage: include files, linking, etc
Advanced features:
Compression parameter selection
Decompression parameter selection
Special color spaces
Error handling
Compressed data handling (source and destination managers)
I/O suspension
Progressive JPEG support
Buffered-image mode
Abbreviated datastreams and multiple images
Special markers
ICC profiles
Raw (downsampled) image data
Really raw data: DCT coefficients
Progress monitoring
Memory management
Memory usage
Library compile-time options
Portability considerations
You should read at least the overview and basic usage sections before trying
to program with the library. The sections on advanced features can be read
if and when you need them.
OVERVIEW
========
Functions provided by the library
---------------------------------
The IJG JPEG library provides C code to read and write JPEG-compressed image
files. The surrounding application program receives or supplies image data a
scanline at a time, using a straightforward uncompressed image format. All
details of color conversion and other preprocessing/postprocessing can be
handled by the library.
The library includes a substantial amount of code that is not covered by the
JPEG standard but is necessary for typical applications of JPEG. These
functions preprocess the image before JPEG compression or postprocess it after
decompression. They include colorspace conversion, downsampling/upsampling,
and color quantization. The application indirectly selects use of this code
by specifying the format in which it wishes to supply or receive image data.
For example, if colormapped output is requested, then the decompression
library automatically invokes color quantization.
A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
and even more so in decompression postprocessing. The decompression library
provides multiple implementations that cover most of the useful tradeoffs,
ranging from very-high-quality down to fast-preview operation. On the
compression side we have generally not provided low-quality choices, since
compression is normally less time-critical. It should be understood that the
low-quality modes may not meet the JPEG standard's accuracy requirements;
nonetheless, they are useful for viewers.
A word about functions *not* provided by the library. We handle a subset of
the ISO JPEG standard; most baseline, extended-sequential, and progressive
JPEG processes are supported. (Our subset includes all features now in common
use.) Unsupported ISO options include:
* Hierarchical storage
* Lossless JPEG
* DNL marker
* Nonintegral subsampling ratios
We support both 8- and 12-bit data precision, but this is a compile-time
choice rather than a run-time choice; hence it is difficult to use both
precisions in a single application.
By itself, the library handles only interchange JPEG datastreams --- in
particular the widely used JFIF file format. The library can be used by
surrounding code to process interchange or abbreviated JPEG datastreams that
are embedded in more complex file formats. (For example, this library is
used by the free LIBTIFF library to support JPEG compression in TIFF.)
Outline of typical usage
------------------------
The rough outline of a JPEG compression operation is:
Allocate and initialize a JPEG compression object
Specify the destination for the compressed data (eg, a file)
Set parameters for compression, including image size & colorspace
jpeg_start_compress(...);
while (scan lines remain to be written)
jpeg_write_scanlines(...);
jpeg_finish_compress(...);
Release the JPEG compression object
A JPEG compression object holds parameters and working state for the JPEG
library. We make creation/destruction of the object separate from starting
or finishing compression of an image; the same object can be re-used for a
series of image compression operations. This makes it easy to re-use the
same parameter settings for a sequence of images. Re-use of a JPEG object
also has important implications for processing abbreviated JPEG datastreams,
as discussed later.
The image data to be compressed is supplied to jpeg_write_scanlines() from
in-memory buffers. If the application is doing file-to-file compression,
reading image data from the source file is the application's responsibility.
The library emits compressed data by calling a "data destination manager",
which typically will write the data into a file; but the application can
provide its own destination manager to do something else.
Similarly, the rough outline of a JPEG decompression operation is:
Allocate and initialize a JPEG decompression object
Specify the source of the compressed data (eg, a file)
Call jpeg_read_header() to obtain image info
Set parameters for decompression
jpeg_start_decompress(...);
while (scan lines remain to be read)
jpeg_read_scanlines(...);
jpeg_finish_decompress(...);
Release the JPEG decompression object
This is comparable to the compression outline except that reading the
datastream header is a separate step. This is helpful because information
about the image's size, colorspace, etc is available when the application
selects decompression parameters. For example, the application can choose an
output scaling ratio that will fit the image into the available screen size.
The decompression library obtains compressed data by calling a data source
manager, which typically will read the data from a file; but other behaviors
can be obtained with a custom source manager. Decompressed data is delivered
into in-memory buffers passed to jpeg_read_scanlines().
It is possible to abort an incomplete compression or decompression operation
by calling jpeg_abort(); or, if you do not need to retain the JPEG object,
simply release it by calling jpeg_destroy().
JPEG compression and decompression objects are two separate struct types.
However, they share some common fields, and certain routines such as
jpeg_destroy() can work on either type of object.
The JPEG library has no static variables: all state is in the compression
or decompression object. Therefore it is possible to process multiple
compression and decompression operations concurrently, using m
没有合适的资源?快使用搜索试试~ 我知道了~
GTK3+OPENSSL+FFMPEG(Win64)
共3937个文件
h:1218个
html:952个
mo:547个
需积分: 5 0 下载量 121 浏览量
2023-06-03
10:25:59
上传
评论
收藏 111.31MB ZIP 举报
温馨提示
GTK3+OPENSSL+FFMPEG 基于Window10 X64,使用Visual Studio 2022 build Tool 编译。 包含Bin/, include/ lib
资源推荐
资源详情
资源评论
收起资源包目录
GTK3+OPENSSL+FFMPEG(Win64) (3937个子文件)
COPYING.LGPLv2.1 26KB
xmlwf.1 10KB
pkgconf.1 8KB
libpng.3 260KB
ffi_call.3 2KB
ffi_prep_cif_var.3 1KB
ffi_prep_cif.3 1KB
ffi.3 891B
libpngpf.3 804B
pc.5 6KB
pkgconf-personality.5 3KB
png.5 2KB
pkg.m4.7 4KB
test-animation.ani 245KB
AUTHORS 1KB
AUTHORS 142B
mandatory-bitmasks.bmp 547KB
valid.1.bmp 7KB
invalid.1.bmp 7KB
bug775242.bmp 5KB
bug776694.bmp 5KB
decodecolormap.bmp 118B
cve-2015-4491.bmp 82B
bmp-line-overflow.bmp 74B
bug777315.bmp 72B
.buildinfo 230B
transcode_aac.c 34KB
transcoding.c 22KB
muxing.c 20KB
tjexample.c 15KB
demuxing_decoding.c 13KB
filter_audio.c 12KB
filtering_audio.c 10KB
vaapi_transcode.c 10KB
filtering_video.c 9KB
hw_decode.c 8KB
resampling_audio.c 8KB
decode_audio.c 7KB
qsvdec.c 7KB
vaapi_encode.c 7KB
encode_audio.c 7KB
encode_video.c 6KB
remuxing.c 6KB
extract_mvs.c 6KB
gobjectnotifyqueue.c 5KB
decode_video.c 5KB
http_multiclient.c 5KB
scaling_video.c 5KB
avio_list_dir.c 4KB
avio_reading.c 4KB
applink.c 4KB
metadata.c 2KB
loaders.cache 225B
changelog 63KB
libjpeg-turboTargets.cmake 5KB
expat.cmake 4KB
libpng16.cmake 4KB
TiffTargets.cmake 4KB
expat-config.cmake 4KB
expat-config-version.cmake 3KB
libjpeg-turboTargets-release.cmake 3KB
harfbuzz-config.cmake 2KB
libjpeg-turboConfigVersion.cmake 2KB
libpng16-release.cmake 1KB
libjpeg-turboConfig.cmake 1009B
expat-release.cmake 904B
TiffTargets-release.cmake 878B
openssl.cnf 12KB
ct_log_list.cnf 412B
gschemas.compiled 2KB
35-lang-normalize.conf 42KB
30-metric-aliases.conf 13KB
large-comment.conf 13KB
65-fonts-persian.conf 10KB
65-nonlatin.conf 9KB
40-nonlatin.conf 8KB
45-latin.conf 7KB
45-generic.conf 3KB
25-unhint-nonlatin.conf 3KB
fonts.conf 3KB
60-latin.conf 2KB
10-scale-bitmap-fonts.conf 2KB
60-generic.conf 2KB
90-synthetic.conf 2KB
20-unhint-small-vera.conf 1KB
im-multipress.conf 890B
50-user.conf 751B
09-autohint-if-no-hinting.conf 717B
11-lcdfilter-default.conf 695B
11-lcdfilter-legacy.conf 692B
11-lcdfilter-light.conf 689B
69-unifont.conf 687B
10-sub-pixel-vrgb.conf 682B
10-sub-pixel-vbgr.conf 682B
10-sub-pixel-rgb.conf 672B
10-sub-pixel-bgr.conf 672B
10-sub-pixel-none.conf 647B
49-sansserif.conf 639B
10-autohint.conf 630B
10-unhinted.conf 625B
共 3937 条
- 1
- 2
- 3
- 4
- 5
- 6
- 40
资源评论
Kalong
- 粉丝: 12
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功