GraphicsMagick: coders/wpg.c: Fix wrong use of LogWPGBitmapType2...
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.20101.1668991208.1350.graphicsmagick-commit@lists.sourceforge.net> |
changeset b695fceb72ad in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b695fceb72ad summary: coders/wpg.c: Fix wrong use of LogWPGBitmapType2() macro, and resore previous definitions. diffstat: ChangeLog | 6 +++--- coders/wpg.c | 52 ++++++++++++++++++++++++++-------------------------- www/Changelog.html | 6 +++--- 3 files changed, 32 insertions(+), 32 deletions(-) diffs (138 lines): diff -r 5376192bebf1 -r b695fceb72ad ChangeLog --- a/ChangeLog Sun Nov 20 17:13:58 2022 -0600 +++ b/ChangeLog Sun Nov 20 18:39:55 2022 -0600 @@ -1,14 +1,14 @@ 2022-11-20 Bob Friesenhahn <[email protected]> + * coders/wpg.c (ReadWPGImage): Fix wrong use of + LogWPGBitmapType2() macro, and resore previous definitions. + * VisualMagick/magick/magick_types.h.in: Declare a ssize_t typedef in VisualStudio's <magick/magick_types.h> due to the unfortunate accidental use of ssize_t in Wand's MagickExtentImage() declaration. This should address SourceForge issue #673 "visual studio include error ssize_t redefinition". - * coders/wpg.c: Fix definition and use of LogHeaderWPG(), - LogWPGBitmapType1(), and LogWPGBitmapType2() macros. - Replace use of ReallocColormap() with previously existing ReallocateImageColormap(), which does the same thing. diff -r 5376192bebf1 -r b695fceb72ad coders/wpg.c --- a/coders/wpg.c Sun Nov 20 17:13:58 2022 -0600 +++ b/coders/wpg.c Sun Nov 20 18:39:55 2022 -0600 @@ -1024,14 +1024,14 @@ " Version=%u.%u\n" \ " EncryptKey=%u\n" \ " Reserved=%u", \ - (unsigned int)(_WPG_HEADER)->FileId, \ - (unsigned int)(_WPG_HEADER)->DataOffset, \ - (unsigned int)(_WPG_HEADER)->ProductType, \ - (unsigned int)(_WPG_HEADER)->FileType, \ - (unsigned int)(_WPG_HEADER)->MajorVersion, \ - (unsigned int)(_WPG_HEADER)->MinorVersion, \ - (unsigned int)(_WPG_HEADER)->EncryptKey, \ - (unsigned int)(_WPG_HEADER)->Reserved) + (unsigned int)_WPG_HEADER.FileId, \ + (unsigned int)_WPG_HEADER.DataOffset, \ + (unsigned int)_WPG_HEADER.ProductType, \ + (unsigned int)_WPG_HEADER.FileType, \ + (unsigned int)_WPG_HEADER.MajorVersion, \ + (unsigned int)_WPG_HEADER.MinorVersion, \ + (unsigned int)_WPG_HEADER.EncryptKey, \ + (unsigned int)_WPG_HEADER.Reserved) #define LogWPGBitmapType1(_WPG_BITMAP_TYPE1) \ (void)LogMagickEvent(CoderEvent,GetMagickModule(), \ @@ -1041,11 +1041,11 @@ " Depth=%u\n" \ " HorzRes=%u\n" \ " VertRes=%u", \ - (unsigned int)(_WPG_BITMAP_TYPE1)->Width, \ - (unsigned int)(_WPG_BITMAP_TYPE1)->Heigth, \ - (unsigned int)(_WPG_BITMAP_TYPE1)->Depth, \ - (unsigned int)(_WPG_BITMAP_TYPE1)->HorzRes, \ - (unsigned int)(_WPG_BITMAP_TYPE1)->VertRes) + (unsigned int)_WPG_BITMAP_TYPE1.Width, \ + (unsigned int)_WPG_BITMAP_TYPE1.Heigth, \ + (unsigned int)_WPG_BITMAP_TYPE1.Depth, \ + (unsigned int)_WPG_BITMAP_TYPE1.HorzRes, \ + (unsigned int)_WPG_BITMAP_TYPE1.VertRes) #define LogWPGBitmapType2(_WPG_BITMAP_TYPE2) \ (void)LogMagickEvent(CoderEvent,GetMagickModule(), \ @@ -1060,16 +1060,16 @@ " Depth=%u\n" \ " HorzRes=%u\n" \ " VertRes=%u", \ - (unsigned int)(_WPG_BITMAP_TYPE2)->RotAngle, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->LowLeftX, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->LowLeftY, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->UpRightX, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->UpRightY, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->Width, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->Heigth, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->Depth, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->HorzRes, \ - (unsigned int)(_WPG_BITMAP_TYPE2)->VertRes) + (unsigned int)_WPG_BITMAP_TYPE2.RotAngle, \ + (unsigned int)_WPG_BITMAP_TYPE2.LowLeftX, \ + (unsigned int)_WPG_BITMAP_TYPE2.LowLeftY, \ + (unsigned int)_WPG_BITMAP_TYPE2.UpRightX, \ + (unsigned int)_WPG_BITMAP_TYPE2.UpRightY, \ + (unsigned int)_WPG_BITMAP_TYPE2.Width, \ + (unsigned int)_WPG_BITMAP_TYPE2.Heigth, \ + (unsigned int)_WPG_BITMAP_TYPE2.Depth, \ + (unsigned int)_WPG_BITMAP_TYPE2.HorzRes, \ + (unsigned int)_WPG_BITMAP_TYPE2.VertRes) /* @@ -1256,7 +1256,7 @@ Header.MinorVersion=ReadBlobByte(image); Header.EncryptKey=ReadBlobLSBShort(image); Header.Reserved=ReadBlobLSBShort(image); - if(logging) LogHeaderWPG(&Header); + if(logging) LogHeaderWPG(Header); if (Header.FileId!=0x435057FF || (Header.ProductType>>8)!=0x16) ThrowReaderException(CorruptImageError,ImproperImageHeader,image); @@ -1327,7 +1327,7 @@ BitmapHeader1.Depth=ReadBlobLSBShort(image); BitmapHeader1.HorzRes=ReadBlobLSBShort(image); BitmapHeader1.VertRes=ReadBlobLSBShort(image); - if(logging) LogWPGBitmapType1(&BitmapHeader1); + if(logging) LogWPGBitmapType1(BitmapHeader1); if(BitmapHeader1.HorzRes && BitmapHeader1.VertRes) { @@ -1380,7 +1380,7 @@ BitmapHeader2.Depth=ReadBlobLSBShort(image); BitmapHeader2.HorzRes=ReadBlobLSBShort(image); BitmapHeader2.VertRes=ReadBlobLSBShort(image); - if(logging) LogWPGBitmapType2(&BitmapHeader2); + if(logging) LogWPGBitmapType2(BitmapHeader2); image->units=PixelsPerCentimeterResolution; image->page.width=(unsigned int) diff -r 5376192bebf1 -r b695fceb72ad www/Changelog.html --- a/www/Changelog.html Sun Nov 20 17:13:58 2022 -0600 +++ b/www/Changelog.html Sun Nov 20 18:39:55 2022 -0600 @@ -40,13 +40,13 @@ <p>2022-11-20 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p> <blockquote> <ul> +<li><p>coders/wpg.c (ReadWPGImage): Fix wrong use of +LogWPGBitmapType2() macro, and resore previous definitions.</p></li> <li><p>VisualMagick/magick/magick_types.h.in: Declare a ssize_t typedef in VisualStudio's <magick/magick_types.h> due to the unfortunate accidental use of ssize_t in Wand's MagickExtentImage() declaration. This should address SourceForge issue #673 "visual -studio include error ssize_t redefinition".</p></li> -<li><p>coders/wpg.c: Fix definition and use of LogHeaderWPG(), -LogWPGBitmapType1(), and LogWPGBitmapType2() macros.</p> +studio include error ssize_t redefinition".</p> <p>Replace use of ReallocColormap() with previously existing ReallocateImageColormap(), which does the same thing.</p> </li>