Include declarations.
*/
#include "MagickCore/studio.h"
+#include "MagickCore/artifact.h"
#include "MagickCore/blob.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/cache.h"
return(MagickFalse);
write_info=CloneImageInfo(image_info);
(void) CopyMagickString(write_info->filename,"PNG:",MaxTextExtent);
+
+ /* Don't write any ancillary chunks except for gAMA and tRNS */
+ (void) SetImageArtifact(write_image,"png:include-chunk",
+ "none,trns,gama");
+
png=(unsigned char *) ImageToBlob(write_info,write_image,&length,
exception);
write_image=DestroyImage(write_image);
* well as a comma-separated list. Chunks that are unknown to
* ImageMagick are always excluded, regardless of their "copy-safe"
* status according to the PNG specification, and even if they
- * appear in the "include-chunk" list.
+ * appear in the "include-chunk" list. Such defines appearing among
+ * the image options take priority over those found among the image
+ * artifacts.
*
* Finally, all chunks listed in the "unused_chunks" array are
* automatically excluded, regardless of the other instructions