mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Enhance pngvalid, correct an error in gray_to_rgb, correct doc error.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
d52cd11ed2
commit
f21a0d0eee
@@ -692,8 +692,13 @@ png_set_gray_to_rgb(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_gray_to_rgb");
|
||||
|
||||
png_ptr->transformations |= PNG_GRAY_TO_RGB;
|
||||
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
||||
if (png_ptr != NULL)
|
||||
{
|
||||
/* Because rgb must be 8 bits or more: */
|
||||
png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
png_ptr->transformations |= PNG_GRAY_TO_RGB;
|
||||
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user