[master] Make png_set|get_compression_buffer_size() available even

when PNG_WRITE_SUPPORTED is not enabled.  There was no good reason
for this restriction, and PNG readers can gain a speed benefit in
reading large iCCP chunks by increasing png_ptr->zbuf_size via
these functions.
This commit is contained in:
Glenn Randers-Pehrson
2010-01-07 11:10:16 -06:00
parent 793fedcf57
commit c87ddbb3ce
8 changed files with 15 additions and 17 deletions

View File

@@ -872,13 +872,11 @@ png_get_user_chunk_ptr(png_structp png_ptr)
}
#endif
#ifdef PNG_WRITE_SUPPORTED
png_size_t PNGAPI
png_get_compression_buffer_size(png_structp png_ptr)
{
return (png_ptr ? png_ptr->zbuf_size : 0L);
}
#endif
#ifdef PNG_SET_USER_LIMITS_SUPPORTED