Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
b2120021
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
接近 2 年 前同步成功
通知
4
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Libpng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b2120021
编写于
1月 31, 1998
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Imported from libpng-0.99a.tar
上级
46f61e23
变更
21
显示空白变更内容
内联
并排
Showing
21 changed file
with
92 addition
and
88 deletion
+92
-88
CHANGES
CHANGES
+4
-1
README
README
+1
-1
libpng.txt
libpng.txt
+2
-2
png.c
png.c
+10
-10
png.h
png.h
+3
-2
pngconf.h
pngconf.h
+2
-2
pngerror.c
pngerror.c
+3
-3
pngget.c
pngget.c
+6
-6
pngmem.c
pngmem.c
+8
-8
pngpread.c
pngpread.c
+2
-2
pngread.c
pngread.c
+2
-2
pngrio.c
pngrio.c
+2
-2
pngrtran.c
pngrtran.c
+2
-2
pngrutil.c
pngrutil.c
+9
-9
pngset.c
pngset.c
+2
-2
pngtest.c
pngtest.c
+16
-16
pngtrans.c
pngtrans.c
+4
-4
pngwio.c
pngwio.c
+2
-2
pngwrite.c
pngwrite.c
+6
-6
pngwtran.c
pngwtran.c
+2
-2
pngwutil.c
pngwutil.c
+4
-4
未找到文件。
CHANGES
浏览文件 @
b2120021
...
...
@@ -200,7 +200,7 @@ version 0.98 [January, 1998]
PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED
added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent)
changed srgb_intent from png_byte to int to avoid compiler bugs
version 0.99 [January, 1998]
version 0.99 [January
30
, 1998]
free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler)
fixed a longstanding "packswap" bug in pngtrans.c
fixed some inconsistencies in pngconf.h that prevented compiling with
...
...
@@ -213,3 +213,6 @@ version 0.99 [January, 1998]
added TARGET_MACOS similar to zlib-1.0.8
define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined
added type casting to all png_malloc() function calls
version 0.99a [January 31, 1998]
added type casts and parentheses to all returns that return a value.(Tim W.)
README
浏览文件 @
b2120021
[NOTE: this is still beta version 0.99; the text below has already
[NOTE: this is still beta version 0.99
a
; the text below has already
been updated in anticipation of the imminent 1.0 release.]
...
...
libpng.txt
浏览文件 @
b2120021
libpng.txt - a description on how to use and modify libpng
libpng version 0.99
libpng version 0.99
a
Updated and distributed by Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
Copyright (c) 1998, Glenn Randers-Pehrson
January 3
0
, 1998
January 3
1
, 1998
based on:
...
...
png.c
浏览文件 @
b2120021
/* png.c - location for general purpose libpng functions
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
@@ -16,7 +16,7 @@
/* Version information for C files. This had better match the version
* string defined in png.h.
*/
char
png_libpng_ver
[
5
]
=
"0.99"
;
char
png_libpng_ver
[
6
]
=
"0.99"
;
/* Place to hold the signature string for a PNG file. */
png_byte
FARDATA
png_sig
[
8
]
=
{
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
};
...
...
@@ -103,15 +103,15 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
if
(
num_to_check
>
8
)
num_to_check
=
8
;
else
if
(
num_to_check
<
1
)
return
0
;
return
(
0
)
;
if
(
start
>
7
)
return
0
;
return
(
0
)
;
if
(
start
+
num_to_check
>
8
)
num_to_check
=
8
-
start
;
return
(
png_memcmp
(
&
sig
[
start
],
&
png_sig
[
start
],
num_to_check
));
return
(
(
int
)(
png_memcmp
(
&
sig
[
start
],
&
png_sig
[
start
],
num_to_check
)
));
}
/* (Obsolete) function to check signature bytes. It does not allow one
...
...
@@ -121,7 +121,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
int
png_check_sig
(
png_bytep
sig
,
int
num
)
{
return
!
png_sig_cmp
(
sig
,
(
png_size_t
)
0
,
(
png_size_t
)
num
);
return
((
int
)
!
png_sig_cmp
(
sig
,
(
png_size_t
)
0
,
(
png_size_t
)
num
)
);
}
/* Function to allocate memory for zlib. */
...
...
@@ -143,7 +143,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
{
png_memset
(
ptr
,
0
,
(
png_size_t
)
num_bytes
);
}
return
(
voidpf
)(
ptr
);
return
(
(
voidpf
)
ptr
);
}
/* function to free memory for zlib */
...
...
@@ -205,7 +205,7 @@ png_create_info_struct(png_structp png_ptr)
png_info_init
(
info_ptr
);
}
return
info_ptr
;
return
(
info_ptr
)
;
}
/* This function frees the memory associated with a single info struct.
...
...
@@ -286,7 +286,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
png_voidp
png_get_io_ptr
(
png_structp
png_ptr
)
{
return
png_ptr
->
io_ptr
;
return
(
png_ptr
->
io_ptr
)
;
}
#if !defined(PNG_NO_STDIO)
...
...
png.h
浏览文件 @
b2120021
/* png.h - header file for PNG reference library
*
* libpng 0.99 beta
* libpng 0.99
a
beta
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998 Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* Note about libpng version numbers:
*
...
...
@@ -27,6 +27,7 @@
* 0.97c 0.97 2.0.97
* 0.98 0.98 2.0.98
* 0.99 0.99 2.0.99
* 0.99a 0.99 2.0.99
* 1.0 1.00 2.1.0
*
* Henceforth the source version will match the shared-library minor
...
...
pngconf.h
浏览文件 @
b2120021
/* pngconf.c - machine configurable file for libpng
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
/* Any machine specific code is near the front of this file, so if you
...
...
pngerror.c
浏览文件 @
b2120021
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file provides a location for all error handling. Users which
* need special error handling are expected to write replacement functions
...
...
@@ -167,7 +167,7 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
png_voidp
png_get_error_ptr
(
png_structp
png_ptr
)
{
return
png_ptr
->
error_ptr
;
return
((
png_voidp
)
png_ptr
->
error_ptr
)
;
}
...
...
pngget.c
浏览文件 @
b2120021
/* pngget.c - retrieval of values from info struct
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
@@ -126,14 +126,14 @@ png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
{
png_debug1
(
1
,
"in %s retrieval function
\n
"
,
"png_get_aspect_ratio"
);
if
(
info_ptr
->
x_pixels_per_unit
==
0
)
return
NULL
;
return
(
0
.
0
)
;
else
return
(
float
)
info_ptr
->
y_pixels_per_unit
/
(
float
)
info_ptr
->
x_pixels_per_unit
;
return
(
(
float
)
info_ptr
->
y_pixels_per_unit
/
(
float
)
info_ptr
->
x_pixels_per_unit
)
;
}
else
#endif
return
(
0
);
return
(
0
.
0
);
}
png_uint_32
...
...
pngmem.c
浏览文件 @
b2120021
/* pngmem.c - stub functions for memory allocation
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file provides a location for all memory allocation. Users which
* need special memory handling are expected to modify the code in this file
...
...
@@ -42,7 +42,7 @@ png_create_struct(int type)
else
if
(
type
==
PNG_STRUCT_PNG
)
size
=
sizeof
(
png_struct
);
else
return
(
png_voidp
)
NULL
;
return
(
(
png_voidp
)
NULL
)
;
if
((
struct_ptr
=
(
png_voidp
)
farmalloc
(
size
))
!=
NULL
)
{
...
...
@@ -88,7 +88,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size)
{
png_voidp
ret
;
if
(
png_ptr
==
NULL
||
size
==
0
)
return
((
voidp
)
NULL
);
return
((
png_
voidp
)
NULL
);
#ifdef PNG_MAX_MALLOC_64K
if
(
size
>
(
png_uint_32
)
65536L
)
...
...
@@ -177,7 +177,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size)
png_error
(
png_ptr
,
"Out of memory."
);
/* Note "o" and "m" */
}
return
ret
;
return
(
ret
)
;
}
/* free a pointer allocated by PNG_MALLOC(). In the default
...
...
@@ -234,7 +234,7 @@ png_create_struct(int type)
else
if
(
type
==
PNG_STRUCT_PNG
)
size
=
sizeof
(
png_struct
);
else
return
(
png_voidp
)
NULL
;
return
(
(
png_voidp
)
NULL
)
;
#if defined(__TURBOC__) && !defined(__FLAT__)
if
((
struct_ptr
=
(
png_voidp
)
farmalloc
(
size
))
!=
NULL
)
...
...
@@ -286,7 +286,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size)
{
png_voidp
ret
;
if
(
png_ptr
==
NULL
||
size
==
0
)
return
(
NULL
);
return
(
(
png_voidp
)
NULL
);
#ifdef PNG_MAX_MALLOC_64K
if
(
size
>
(
png_uint_32
)
65536L
)
...
...
@@ -308,7 +308,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size)
png_error
(
png_ptr
,
"Out of Memory"
);
}
return
ret
;
return
(
ret
)
;
}
/* Free a pointer allocated by PNG_MALLOC(). In the default
...
...
pngpread.c
浏览文件 @
b2120021
/* pngpread.c - read a png file in push mode
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
pngread.c
浏览文件 @
b2120021
/* pngread.c - read a PNG file
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file contains routines that an application calls directly to
* read a PNG file or stream.
...
...
pngrio.c
浏览文件 @
b2120021
/* pngrio.c - functions for data input
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file provides a location for all input. Users which need
* special handling are expected to write a function which has the same
...
...
pngrtran.c
浏览文件 @
b2120021
/* pngrtran.c - transforms the data in a row for PNG readers
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file contains functions optionally called by an application
* in order to tell libpng how to handle data when reading a PNG.
...
...
pngrutil.c
浏览文件 @
b2120021
/* pngrutil.c - utilities to read a PNG file
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file contains routines which are only called from within
* libpng itself during the course of reading an image.
...
...
@@ -27,7 +27,7 @@ png_get_uint_32(png_bytep buf)
((
png_uint_32
)(
*
(
buf
+
2
))
<<
8
)
+
(
png_uint_32
)(
*
(
buf
+
3
));
return
i
;
return
(
i
)
;
}
#if defined(PNG_READ_pCAL_SUPPORTED)
...
...
@@ -44,7 +44,7 @@ png_get_int_32(png_bytep buf)
((
png_int_32
)(
*
(
buf
+
2
))
<<
8
)
+
(
png_int_32
)(
*
(
buf
+
3
));
return
i
;
return
(
i
)
;
}
#endif
/* PNG_READ_pCAL_SUPPORTED */
...
...
@@ -57,7 +57,7 @@ png_get_uint_16(png_bytep buf)
i
=
(
png_uint_16
)(((
png_uint_16
)(
*
buf
)
<<
8
)
+
(
png_uint_16
)(
*
(
buf
+
1
)));
return
i
;
return
(
i
)
;
}
#endif
/* PNG_READ_BIG_ENDIAN_SUPPORTED */
...
...
@@ -100,10 +100,10 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
{
png_chunk_error
(
png_ptr
,
"CRC error"
);
}
return
1
;
return
(
1
)
;
}
return
0
;
return
(
0
)
;
}
/* Compare the CRC stored in the PNG file with that calculated by libpng from
...
...
@@ -132,10 +132,10 @@ png_crc_error(png_structp png_ptr)
if
(
need_crc
)
{
crc
=
png_get_uint_32
(
crc_bytes
);
return
(
crc
!=
png_ptr
->
crc
);
return
(
(
int
)(
crc
!=
png_ptr
->
crc
)
);
}
else
return
0
;
return
(
0
)
;
}
...
...
pngset.c
浏览文件 @
b2120021
/* pngset.c - storage of image information into info struct
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* The functions here are used during reads to store data from the file
* into the info struct, and during writes to store application data
...
...
pngtest.c
浏览文件 @
b2120021
/* pngtest.c - a simple test program to test libpng
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This program reads in a PNG image, writes it out again, and then
* compares the two files. If the files are identical, this shows that
...
...
@@ -281,10 +281,10 @@ png_voidp
png_malloc
(
png_structp
png_ptr
,
png_uint_32
size
)
{
if
(
png_ptr
==
NULL
)
{
fprintf
(
STDERR
,
"NULL pointer to memory allocator
\n
"
);
return
NULL
;
return
(
NULL
)
;
}
if
(
size
==
0
)
return
NULL
;
return
(
NULL
)
;
/* This calls the library allocator twice, once to get the requested
buffer and once to get a new free list entry. */
...
...
@@ -299,7 +299,7 @@ png_malloc(png_structp png_ptr, png_uint_32 size) {
pinformation
=
pinfo
;
/* Make sure the caller isn't assuming zeroed memory. */
png_memset
(
pinfo
->
pointer
,
0xdd
,
pinfo
->
size
);
return
pinfo
->
pointer
;
return
((
png_voidp
)
pinfo
->
pointer
)
;
}
}
...
...
@@ -369,14 +369,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if
((
fpin
=
fopen
(
inname
,
"rb"
))
==
NULL
)
{
fprintf
(
STDERR
,
"Could not find input file %s
\n
"
,
inname
);
return
1
;
return
(
1
)
;
}
if
((
fpout
=
fopen
(
outname
,
"wb"
))
==
NULL
)
{
fprintf
(
STDERR
,
"Could not open output file %s
\n
"
,
outname
);
fclose
(
fpin
);
return
1
;
return
(
1
)
;
}
png_debug
(
0
,
"Allocating read and write structures
\n
"
);
...
...
@@ -409,7 +409,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_destroy_write_struct
(
&
write_ptr
,
&
write_info_ptr
);
fclose
(
fpin
);
fclose
(
fpout
);
return
1
;
return
(
1
)
;
}
png_debug
(
0
,
"Setting jmpbuf for write struct
\n
"
);
...
...
@@ -425,7 +425,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_destroy_write_struct
(
&
write_ptr
,
&
write_info_ptr
);
fclose
(
fpin
);
fclose
(
fpout
);
return
1
;
return
(
1
)
;
}
#ifdef USE_FAR_KEYWORD
...
...
@@ -621,7 +621,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_destroy_write_struct
(
&
write_ptr
,
&
write_info_ptr
);
fclose
(
fpin
);
fclose
(
fpout
);
return
1
;
return
(
1
)
;
}
num_pass
=
png_set_interlace_handling
(
read_ptr
);
...
...
@@ -663,14 +663,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if
((
fpin
=
fopen
(
inname
,
"rb"
))
==
NULL
)
{
fprintf
(
STDERR
,
"Could not find file %s
\n
"
,
inname
);
return
1
;
return
(
1
)
;
}
if
((
fpout
=
fopen
(
outname
,
"rb"
))
==
NULL
)
{
fprintf
(
STDERR
,
"Could not find file %s
\n
"
,
outname
);
fclose
(
fpin
);
return
1
;
return
(
1
)
;
}
while
(
1
)
...
...
@@ -686,7 +686,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
inname
,
outname
);
fclose
(
fpin
);
fclose
(
fpout
);
return
1
;
return
(
1
)
;
}
if
(
!
num_in
)
...
...
@@ -697,14 +697,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
fprintf
(
STDERR
,
"Files %s and %s are different
\n
"
,
inname
,
outname
);
fclose
(
fpin
);
fclose
(
fpout
);
return
1
;
return
(
1
)
;
}
}
fclose
(
fpin
);
fclose
(
fpout
);
return
0
;
return
(
0
)
;
}
/* input and output filenames */
...
...
@@ -867,5 +867,5 @@ main(int argc, char *argv[])
fprintf
(
STDERR
,
"libpng passes test
\n
"
);
else
fprintf
(
STDERR
,
"libpng FAILS test
\n
"
);
return
ierror
!=
0
;
return
((
int
)(
ierror
!=
0
))
;
}
pngtrans.c
浏览文件 @
b2120021
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
@@ -77,10 +77,10 @@ png_set_interlace_handling(png_structp png_ptr)
if
(
png_ptr
->
interlaced
)
{
png_ptr
->
transformations
|=
PNG_INTERLACE
;
return
7
;
return
(
7
)
;
}
return
1
;
return
(
1
)
;
}
#endif
...
...
pngwio.c
浏览文件 @
b2120021
/* pngwio.c - functions for data output
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*
* This file provides a location for all output. Users which need
* special handling are expected to write functions which have the same
...
...
pngwrite.c
浏览文件 @
b2120021
/* pngwrite.c - general routines to write a PNG file
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
/* get internal access to png.h */
...
...
@@ -249,7 +249,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
ptime
->
year
,
ptime
->
hour
%
24
,
ptime
->
minute
%
60
,
ptime
->
second
%
61
);
#endif
return
png_ptr
->
time_buffer
;
return
((
png_charp
)
png_ptr
->
time_buffer
)
;
}
#endif
/* PNG_TIME_RFC1123_SUPPORTED */
...
...
@@ -289,7 +289,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr,
png_debug
(
1
,
"in png_create_write_struct
\n
"
);
if
((
png_ptr
=
(
png_structp
)
png_create_struct
(
PNG_STRUCT_PNG
))
==
NULL
)
{
return
(
png_structp
)
NULL
;
return
(
(
png_structp
)
NULL
)
;
}
#ifdef USE_FAR_KEYWORD
if
(
setjmp
(
jmpbuf
))
...
...
@@ -299,7 +299,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr,
{
png_free
(
png_ptr
,
png_ptr
->
zbuf
);
png_destroy_struct
(
png_ptr
);
return
(
png_structp
)
NULL
;
return
(
(
png_structp
)
NULL
)
;
}
#ifdef USE_FAR_KEYWORD
png_memcpy
(
png_ptr
->
jmpbuf
,
jmpbuf
,
sizeof
(
jmp_buf
));
...
...
@@ -329,7 +329,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr,
1
,
NULL
,
NULL
);
#endif
return
(
png_ptr
);
return
(
(
png_structp
)
png_ptr
);
}
...
...
pngwtran.c
浏览文件 @
b2120021
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
pngwutil.c
浏览文件 @
b2120021
/* pngwutil.c - utilities to write a PNG file
*
* libpng 0.99
* libpng 0.99
a
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 3
0
, 1998
* January 3
1
, 1998
*/
#define PNG_INTERNAL
...
...
@@ -599,7 +599,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
if
(
key
==
NULL
||
(
key_len
=
png_strlen
(
key
))
==
0
)
{
png_chunk_warning
(
png_ptr
,
"zero length keyword"
);
return
0
;
return
((
png_size_t
)
0
)
;
}
png_debug1
(
2
,
"Keyword to be checked is '%s'
\n
"
,
key
);
...
...
@@ -688,7 +688,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
key_len
=
79
;
}
return
key_len
;
return
(
key_len
)
;
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录