[libpng16] Removed png_get_signature() and info_ptr->signature from WRITE-only
builds. Restored png_get_channels() to WRITE-only builds.
This commit is contained in:
parent
8d3453a22d
commit
5d1df4fdf4
2
png.h
2
png.h
@ -2008,11 +2008,9 @@ PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr,
|
|||||||
png_inforp info_ptr, png_bytepp row_pointers));
|
png_inforp info_ptr, png_bytepp row_pointers));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
|
||||||
/* Returns number of color channels in image. */
|
/* Returns number of color channels in image. */
|
||||||
PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr,
|
PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr,
|
||||||
png_const_inforp info_ptr));
|
png_const_inforp info_ptr));
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_EASY_ACCESS_SUPPORTED
|
#ifdef PNG_EASY_ACCESS_SUPPORTED
|
||||||
/* Returns image width in pixels. */
|
/* Returns image width in pixels. */
|
||||||
|
2
pngget.c
2
pngget.c
@ -423,7 +423,6 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||||||
#endif /* PNG_EASY_ACCESS_SUPPORTED */
|
#endif /* PNG_EASY_ACCESS_SUPPORTED */
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
|
||||||
png_byte PNGAPI
|
png_byte PNGAPI
|
||||||
png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||||
{
|
{
|
||||||
@ -433,6 +432,7 @@ png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
png_const_bytep PNGAPI
|
png_const_bytep PNGAPI
|
||||||
png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,10 @@ struct png_info_def
|
|||||||
png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
|
png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
|
||||||
png_byte pixel_depth; /* number of bits per pixel */
|
png_byte pixel_depth; /* number of bits per pixel */
|
||||||
png_byte spare_byte; /* to align the data, and for future use */
|
png_byte spare_byte; /* to align the data, and for future use */
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
png_byte signature[8]; /* magic bytes read by libpng from start of file */
|
png_byte signature[8]; /* magic bytes read by libpng from start of file */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The rest of the data is optional. If you are reading, check the
|
/* The rest of the data is optional. If you are reading, check the
|
||||||
* valid field to see if the information in these are valid. If you
|
* valid field to see if the information in these are valid. If you
|
||||||
|
Loading…
Reference in New Issue
Block a user