From 2ac4147513fbf2ebdcad0efc707eea0cfc700401 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 20 Jul 2019 16:21:10 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1643 --- ChangeLog | 2 ++ PerlMagick/t/write.t | 2 +- coders/pnm.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2eb363e30..c7a8e3201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ 2019-07-20 7.0.8-56 Cristy * Unexpected -alpha shape results (reference https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36396). + * Converting from PDF to PBM inverts the image (reference + https://github.com/ImageMagick/ImageMagick/issues/1643). 2019-07-18 7.0.8-55 Cristy * Release ImageMagick version 7.0.8-55, GIT revision 15930:ac09240:20190718. diff --git a/PerlMagick/t/write.t b/PerlMagick/t/write.t index 6c5f401a1..c8465818e 100644 --- a/PerlMagick/t/write.t +++ b/PerlMagick/t/write.t @@ -106,7 +106,7 @@ print("Portable bitmap format (black and white), binary format ...\n"); testReadWrite( 'PBM:input_p4.pbm', 'PBM:output_p4.pbm', q//, - '88ad5b37729ccd4fc292fbaf32776e8009f72abc6136827383231af3676ba956'); + '71e1a6be223e307b1dbf732860792b15adba662b7a7ef284daf7f982f874ccf1'); print("ZSoft IBM PC Paintbrush file ...\n"); ++$test; diff --git a/coders/pnm.c b/coders/pnm.c index 13d1beae2..e828f7cac 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -1945,6 +1945,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image, if (quantum_info == (QuantumInfo *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); (void) SetQuantumEndian(image,quantum_info,MSBEndian); + SetQuantumMinIsWhite(quantum_info,MagickTrue); pixels=GetQuantumPixels(quantum_info); for (y=0; y < (ssize_t) image->rows; y++) { -- 2.40.0