diff --git a/ANNOUNCE b/ANNOUNCE index 6aeb64446..99aa75588 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -156,6 +156,9 @@ Version 1.5.3rc02 [June 8, 2011] Version 1.5.3beta11 [June 11, 2011] Fixed png_handle_sCAL which is broken in 1.5; added sCAL to pngtest.png + Revised documentation about png_set_user_limits() to say that it can + only be used to reduce the defined limit, and that it also affects + png writing. Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 0daf80a0e..5d09122bc 100644 --- a/CHANGES +++ b/CHANGES @@ -3419,6 +3419,9 @@ Version 1.5.3rc02 [June 8, 2011] Version 1.5.3beta11 [June 11, 2011] Fixed png_handle_sCAL which is broken in 1.5; added sCAL to pngtest.png + Revised documentation about png_set_user_limits() to say that it can + only be used to reduce the defined limit, and that it also affects + png writing. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/libpng-manual.txt b/libpng-manual.txt index 008edfc4d..c8fa524f0 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -597,7 +597,7 @@ large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. Since very few applications really need to process such large images, we have imposed an arbitrary 1-million limit on rows and columns. Larger images will be rejected immediately with a png_error() call. If -you wish to override this limit, you can use +you wish to reduce this limit, you can use png_set_user_limits(png_ptr, width_max, height_max); @@ -607,6 +607,10 @@ anyway because of potential buffer overflow conditions). You should put this statement after you create the PNG structure and before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr); diff --git a/libpng.3 b/libpng.3 index 988ea4bf6..40b2e6c0d 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1548,7 +1548,7 @@ large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. Since very few applications really need to process such large images, we have imposed an arbitrary 1-million limit on rows and columns. Larger images will be rejected immediately with a png_error() call. If -you wish to override this limit, you can use +you wish to reduce this limit, you can use png_set_user_limits(png_ptr, width_max, height_max); @@ -1558,6 +1558,10 @@ anyway because of potential buffer overflow conditions). You should put this statement after you create the PNG structure and before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr);