mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fixes for !READ_INTERLACE/!READ_PNG interpendencies
The reliance of png_read_png on interlace handling and some minor issues in the test programs where they failed to correctly check for interlace handling were exposed by the ability to write interlaced images even if WRITE_INTERLACING is turned off. This is fixed here. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
# include <setjmp.h> /* because png.h did *not* include this */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)\
|
||||
&& defined(PNG_READ_PNG_SUPPORTED)
|
||||
/* If a transform is valid on both read and write this implies that if the
|
||||
* transform is applied to read it must also be applied on write to produce
|
||||
* meaningful data. This is because these transforms when performed on read
|
||||
@@ -1676,7 +1677,7 @@ main(const int argc, const char * const * const argv)
|
||||
return errors != 0;
|
||||
}
|
||||
}
|
||||
#else /* !PNG_INFO_IMAGE_SUPPORTED || !PNG_READ_SUPPORTED */
|
||||
#else /* !INFO_IMAGE || !SEQUENTIAL_READ || !READ_PNG*/
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user