[libpng16] Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING

in the manual, example.c, pngtest.c, and applications in the contrib directory.
It was incorrect advice.
This commit is contained in:
Glenn Randers-Pehrson
2014-11-06 06:39:56 -06:00
parent 8e7c35fc81
commit 61ea3eacb0
14 changed files with 34 additions and 28 deletions

View File

@@ -294,7 +294,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
* the compiler header file version, so that we know if the application
* was compiled with a compatible version of the library. REQUIRED
*/
png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)
@@ -613,7 +613,7 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
* the library version is compatible in case we are using dynamically
* linked libraries.
*/
*png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),
*png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (*png_ptr == NULL)
@@ -779,7 +779,7 @@ void write_png(char *file_name /* , ... other image information ... */)
* the library version is compatible with the one used at compile time,
* in case we are using dynamically linked libraries. REQUIRED.
*/
png_ptr = png_create_write_struct(png_get_libpng_ver(NULL),
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)