From 279dc3f0bfece0855502d354b400f7bb93d21357 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 6 May 2015 17:02:47 -0500 Subject: [PATCH] [libpng16] Added some documentation about features of the Simplified Write API. --- libpng-manual.txt | 5 +++-- libpng.3 | 5 +++-- png.h | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libpng-manual.txt b/libpng-manual.txt index b787a3d06..896c97a87 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -4065,10 +4065,11 @@ a 16-bit linear encoded PNG file is written. With all APIs row_stride is handled as in the read APIs - it is the spacing from one row to the next in component sized units (float) and if negative -indicates a bottom-up row layout in the buffer. +indicates a bottom-up row layout in the buffer. If you pass zero, libpng will +calculate the row_stride for you from the width and number of channels. Note that the write API does not support interlacing, sub-8-bit pixels, -and indexed (paletted) images. +indexed (paletted) images, or most ancillary chunks. VI. Modifying/Customizing libpng diff --git a/libpng.3 b/libpng.3 index 95a848515..cb32805c7 100644 --- a/libpng.3 +++ b/libpng.3 @@ -4569,10 +4569,11 @@ a 16-bit linear encoded PNG file is written. With all APIs row_stride is handled as in the read APIs - it is the spacing from one row to the next in component sized units (float) and if negative -indicates a bottom-up row layout in the buffer. +indicates a bottom-up row layout in the buffer. If you pass zero, libpng will +calculate the row_stride for you from the width and number of channels. Note that the write API does not support interlacing, sub-8-bit pixels, -and indexed (paletted) images. +indexed (paletted) images, or most ancillary chunks. .SH VI. Modifying/Customizing libpng diff --git a/png.h b/png.h index 9a6b809a9..a3eb41704 100644 --- a/png.h +++ b/png.h @@ -3211,9 +3211,11 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, * * With all APIs row_stride is handled as in the read APIs - it is the spacing * from one row to the next in component sized units (1 or 2 bytes) and if - * negative indicates a bottom-up row layout in the buffer. + * negative indicates a bottom-up row layout in the buffer. If row_stride is zero, + * libpng will calculate it for you from the image width and number of channels. * - * Note that the write API does not support interlacing or sub-8-bit pixels. + * Note that the write API does not support interlacing, sub-8-bit pixels, indexed + * PNG (color_type 3) or most ancillary chunks. */ #endif /* STDIO */ #endif /* SIMPLIFIED_WRITE */