mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Fix inconsistencies in use of PNG_GET_PALETTE_MAX
This commit is contained in:
parent
8849c000ea
commit
a92e5a86f8
10
png.h
10
png.h
@ -2651,16 +2651,14 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
||||
: (png_int_32)png_get_uint_32(buf)))
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr,
|
||||
int allowed));
|
||||
#if defined(PNG_READ_GET_PALETTE_MAX_SUPPORTED) || \
|
||||
defined(PNG_READ_GET_PALETTE_MAX_SUPPORTED)
|
||||
# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
|
||||
PNG_EXPORT(235, int, png_get_palette_max, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
#endif
|
||||
#endif
|
||||
# endif
|
||||
#endif /* CHECK_FOR_INVALID_INDEX */
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||
* defs
|
||||
|
4
pngget.c
4
pngget.c
@ -1128,7 +1128,7 @@ png_get_io_chunk_name (png_structp png_ptr)
|
||||
#endif /* ?PNG_IO_STATE_SUPPORTED */
|
||||
|
||||
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#ifdef PNG_GET_PALETTE_MAX_SUPPORTED
|
||||
# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
|
||||
int PNGAPI
|
||||
png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
|
||||
{
|
||||
@ -1137,7 +1137,7 @@ png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
|
||||
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
@ -589,8 +589,7 @@ option READ_CHECK_FOR_INVALID_INDEX requires READ CHECK_FOR_INVALID_INDEX
|
||||
option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE CHECK_FOR_INVALID_INDEX
|
||||
|
||||
# added at libpng-1.5.15
|
||||
option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX
|
||||
option GET_PALETTE_MAX enables WRITE_GET_PALETTE_MAX
|
||||
option READ_GET_PALETTE_MAX requires CHECK_FOR_INVALID_INDEX
|
||||
option WRITE_GET_PALETTE_MAX requires CHECK_FOR_INVALID_INDEX
|
||||
option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX WRITE_GET_PALETTE_MAX
|
||||
option READ_GET_PALETTE_MAX requires READ_CHECK_FOR_INVALID_INDEX disabled
|
||||
option WRITE_GET_PALETTE_MAX requires WRITE_CHECK_FOR_INVALID_INDEX disabled
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user