summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>1999-12-10 09:43:02 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:04:47 -0500
commit166c5a397e16e97b7a533ba8f6e89019af4faa17 (patch)
tree44811e6cda7b30fc2e96465f62416ae705de84f9 /example.c
parent074af5e9caf8035318c93ec309ec59109014e209 (diff)
downloadlibpng-166c5a397e16e97b7a533ba8f6e89019af4faa17.tar.gz
Imported from libpng-1.0.5h.tarv1.0.5h
Diffstat (limited to 'example.c')
-rw-r--r--example.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/example.c b/example.c
index 430450437..50a285fad 100644
--- a/example.c
+++ b/example.c
@@ -595,6 +595,11 @@ void write_png(char *file_name /* , ... other image information ... */)
text_ptr[2].key = "Description";
text_ptr[2].text = "<long text>";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
+#ifdef PNG_iTXt_SUPPORTED
+ text_ptr[0].lang = NULL;
+ text_ptr[1].lang = NULL;
+ text_ptr[2].lang = NULL;
+#endif
png_set_text(png_ptr, info_ptr, text_ptr, 3);
/* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */
@@ -699,8 +704,6 @@ void write_png(char *file_name /* , ... other image information ... */)
/* if you malloced the palette, free it here */
free(info_ptr->palette);
- /* if you allocated any text comments, free them here */
-
/* clean up after the write, and free any memory allocated */
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);