summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-06 06:39:56 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-06 06:39:56 -0600
commit61ea3eacb0d0e417fd2d67d0ec1ac54392823261 (patch)
tree9c6053b179573abdbca978671b5caa9bd1025a22 /example.c
parent8e7c35fc811b1cd413076d208d675cbf190535c2 (diff)
[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.
Diffstat (limited to 'example.c')
-rw-r--r--example.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/example.c b/example.c
index aeb373514..f8067b936 100644
--- a/example.c
+++ b/example.c
@@ -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)