libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.17 - March 26, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 Glenn Randers-Pehrson
This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer
and license in png.h
Based on:
libpng versions 0.97, January 1998, through 1.6.17 - March 26, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
libpng 1.0 beta 6 - version 0.96 - May 28, 1997
Updated and distributed by Andreas Dilger
Copyright (c) 1996, 1997 Andreas Dilger
libpng 1.0 beta 2 - version 0.88 - January 26, 1996
For conditions of distribution and use, see copyright
notice in png.h. Copyright (c) 1995, 1996 Guy Eric
Schalnat, Group 42, Inc.
Updated/rewritten per request in the libpng FAQ
Copyright (c) 1995, 1996 Frank J. T. Wojcik
December 18, 1995 & January 20, 1996
TABLE OF CONTENTS
I. Introduction
II. Structures
III. Reading
IV. Writing
V. Simplified API
VI. Modifying/Customizing libpng
VII. MNG support
VIII. Changes to Libpng from version 0.88
IX. Changes to Libpng from version 1.0.x to 1.2.x
X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x
XI. Changes to Libpng from version 1.4.x to 1.5.x
XII. Changes to Libpng from version 1.5.x to 1.6.x
XIII. Detecting libpng
XIV. Source code repository
XV. Coding style
XVI. Y2K Compliance in libpng
I. Introduction
This file describes how to use and modify the PNG reference library
(known as libpng) for your own use. In addition to this
file, example.c is a good starting point for using the library, as
it is heavily commented and should include everything most people
will need. We assume that libpng is already installed; see the
INSTALL file for instructions on how to configure and install libpng.
For examples of libpng usage, see the files "example.c", "pngtest.c",
and the files in the "contrib" directory, all of which are included in
the libpng distribution.
Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.
The PNG specification (second edition), November 2003, is available as
a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
<http://www.w3.org/TR/2003/REC-PNG-20031110/
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
<http://www.libpng.org/pub/png/documents/>. It is technically equivalent
to the PNG specification (second edition) but has some additional material.
The PNG-1.0 specification is available
as RFC 2083 <http://www.libpng.org/pub/png/documents/> and as a
W3C Recommendation <http://www.w3.org/TR/REC.png.html>.
Some additional chunks are described in the special-purpose public chunks
documents at <http://www.libpng.org/pub/png/documents/>.
Other information
about PNG, and the latest version of libpng, can be found at the PNG home
page, <http://www.libpng.org/pub/png/>.
Most users will not have to modify the library significantly; advanced
users may want to modify it more. All attempts were made to make it as
complete as possible, while keeping the code easy to understand.
Currently, this library only supports C. Support for other languages
is being considered.
Libpng has been designed to handle multiple sessions at one time,
to be easily modifiable, to be portable to the vast majority of
machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy
to use. The ultimate goal of libpng is to promote the acceptance of
the PNG file format in whatever way possible. While there is still
work to be done (see the TODO file), libpng should cover the
majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can
be found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.
The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details.
You can usually find the source files for the zlib utility wherever you
find the libpng source files.
Libpng is thread safe, provided the threads are using different
instances of the structures. Each thread should have its own
png_struct and png_info instances, and thus its own image.
Libpng does not protect itself against two threads using the
same instance of a structure.
II. Structures
There are two main structures that are important to libpng, png_struct
and png_info. Both are internal structures that are no longer exposed
in the libpng interface (as of libpng 1.5.0).
The png_info structure is designed to provide information about the
PNG file. At one time, the fields of png_info were intended to be
directly accessible to the user. However, this tended to cause problems
with applications using dynamically loaded libraries, and as a result
a set of interface functions for png_info (the png_get_*() and png_set_*()
functions) was developed, and direct access to the png_info fields was
deprecated..
The png_struct structure is the object used by the library to decode a
single image. As of 1.5.0 this structure is also not exposed.
Almost all libpng APIs require a pointer to a png_struct as the first argument.
Many (in particular the png_set and png_get APIs) also require a pointer
to png_info as the second argument. Some application visible macros
defined in png.h designed for basic data access (reading and writing
integers in the PNG format) don't take a png_info pointer, but it's almost
always safe to assume that a (png_struct*) has to be passed to call an API
function.
You can have more than one png_info structure associated with an image,
as illustrated in pngtest.c, one for information valid prior to the
IDAT chunks and another (called "end_info" below) for things after them.
The png.h header file is an invaluable reference for programming with libpng.
And while I'm on the topic, make sure you include the libpng header file:
#include <png.h>
and also (as of libpng-1.5.0) the zlib header file, if you need it:
#include <zlib.h>
Types
The png.h header file defines a number of integral types used by the
APIs. Most of these are fairly obvious; for example types corresponding
to integers of particular sizes and types for passing color values.
One exception is how non-integral numbers are handled. For application
convenience most APIs that take such numbers have C (double) arguments;
however, internally PNG, and libpng, use 32 bit signed integers and encode
the value by multiplying by 100,000. As of libpng 1.5.0 a convenience
macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point)
which is simply (png_int_32).
All APIs that take (double) arguments also have a matching API that
takes the corresponding fixed point integer arguments. The fixed point
API has the same name as the floating point one with "_fixed" appended.
The actual range of values permitted in the APIs is frequently less than
the full range of (png_fixed_point) (-21474 to +21474). When APIs require
a non-negative argument the type is recorded as png_uint_32 above. Consult
the header file and the text below for more information.
Special care must be take with sCAL chunk handling because the chunk itself
uses non-integral values encoded as strings containing decimal floating point
numbers. See the comments in the header file.
Configuration
The main header file function declarations are frequently protected by C
preprocessing directives of the form:
#ifdef PNG_feature_SUPPORTED
declare-function
#endif
...
#ifdef PNG_feature_SUPPORTED
use-function
#endif
The library can be built without support for the
没有合适的资源?快使用搜索试试~ 我知道了~
openAI 的 Gym Retro项目.zip
共2000个文件
h:876个
c:752个
cpp:211个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 84 浏览量
2024-05-15
11:37:19
上传
评论
收藏 164.6MB ZIP 举报
温馨提示
openai 基本原理 基本原理是,通过深度学习算法,将大量的文本内容输入模型中进行训练,模型会自动学习语言的结构规律,从而可以生成高质量的文本。 产品定位 在 GPT 出现之前,NLP 模型主要是基于针对特定任务的大量标注数据进行训练。但会存在一些限制:大规模高质量的标注数据不易获得;模型仅限于所接受的训练,泛化能力不足;无法执行开箱即用的任务,限制了模型的落地应用。为了克服这些问题,OpenAI 走上了预训练大模型的道路。从 GPT-1 到 ChatGPT,就是一个预训练模型越来越大、效果越来越强的过程, 不断迭代。 在OpenAI的官网上,ChatGPT被描述为优化对话的语言模型,是GPT-3.5架构的主力模型。GPT- 3.5架构基于OpenAI于2020年推出的GPT-3架构,即生成式语言模型的第3代。早在2020年6月,在训练约2000亿个单词、烧掉几千万美元后,史上最强大AI模型GPT-3一炮而红。 产品功能 作为聊天机器人,ChatGPT具有同类产品具备的一些特性,例如对话能力,能够在同一个会话期间内回答上下文相关的后续问题。
资源推荐
资源详情
资源评论
收起资源包目录
openAI 的 Gym Retro项目.zip (2000个子文件)
sqlite3.c 6.73MB
pngvalid.c 345KB
z80.c 218KB
stream_encoder.c 183KB
pngrtran.c 164KB
png.c 150KB
pngrutil.c 138KB
menu.c 135KB
pngread.c 135KB
stream_decoder.c 131KB
stream_decoder.c 131KB
pngfix.c 127KB
metadata_iterators.c 120KB
vdp_render.c 108KB
pngstest.c 106KB
vdp_ctrl.c 89KB
pngwutil.c 87KB
main.c 84KB
rpng2-x.c 80KB
pngwrite.c 77KB
libretro.c 75KB
chd.c 74KB
chd.c 74KB
deflate.c 70KB
deflate.c 70KB
unzip.c 69KB
cdd.c 66KB
ym2612.c 66KB
LzmaEnc.c 65KB
LzmaEnc.c 65KB
framing.c 65KB
zip.c 64KB
lpc_intrin_avx2.c 64KB
lpc_intrin_avx2.c 64KB
md_cart.c 63KB
LzmaEnc.c 63KB
lpc_intrin_sse41.c 62KB
lpc_intrin_sse41.c 62KB
metadata_object.c 61KB
scd.c 61KB
gx_video.c 59KB
vorbisfile.c 58KB
pngtest.c 58KB
gui.c 56KB
y.tab.c 54KB
libretro.c 54KB
inflate.c 54KB
inflate.c 52KB
inflate.c 52KB
sms_cart.c 52KB
gx_input.c 51KB
lpc_intrin_sse2.c 50KB
lpc_intrin_sse2.c 50KB
ym2413.c 49KB
pngimage.c 49KB
pngset.c 46KB
cheats.c 46KB
lpc.c 46KB
lpc.c 46KB
vorbisfile.c 45KB
7zArcIn.c 44KB
rpng2-win.c 44KB
7zArcIn.c 44KB
trees.c 43KB
trees.c 43KB
aes.c 41KB
gzlog.c 40KB
inffas86.c 40KB
makepng.c 39KB
example.c 39KB
ssp16.c 39KB
puff.c 37KB
menu.c 37KB
mem68k.c 37KB
cdrom.c 36KB
unzip.c 36KB
unzip.c 36KB
cdrom.c 36KB
unzip.c 35KB
audio.c 34KB
system.c 34KB
pngunknown.c 34KB
pngpread.c 33KB
video.c 33KB
core.c 33KB
pngget.c 33KB
bitreader.c 33KB
bitreader.c 33KB
software.c 32KB
loadrom.c 32KB
mmc3.c 32KB
gles2.c 32KB
lexer.c 31KB
cli-debugger.c 31KB
getopt.c 31KB
ines.c 31KB
wpng.c 30KB
rpng-x.c 30KB
LzmaDec.c 30KB
isa-arm.c 30KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
野生的狒狒
- 粉丝: 2645
- 资源: 2167
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功