GraphicsMagick: 2 new changesets
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.19882.1668943573.1567.graphicsmagick-commit@lists.sourceforge.net> |
changeset c9e4d8237628 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=c9e4d8237628 summary: coders/pcx.c Typo fix, unalligned source. changeset 1976d2fdce7d in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=1976d2fdce7d summary: coders/wpg.c Reveal more internal info to optional log diffstat: ChangeLog | 4 ++++ coders/pcx.c | 2 +- coders/wpg.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 2 deletions(-) diffs (121 lines): diff -r 26618bb09f5e -r 1976d2fdce7d ChangeLog --- a/ChangeLog Sat Nov 19 15:05:46 2022 -0600 +++ b/ChangeLog Sun Nov 20 12:25:33 2022 +0100 @@ -1,3 +1,7 @@ +2022-11-20 Fojtik Jaroslav <[email protected]> + + coders/wpg.c Reveal more internal info to optional log. + 2022-11-19 Bob Friesenhahn <[email protected]> * PerlMagick/t/wmf/read.t: Change reference images from MIFF diff -r 26618bb09f5e -r 1976d2fdce7d coders/pcx.c --- a/coders/pcx.c Sat Nov 19 15:05:46 2022 -0600 +++ b/coders/pcx.c Sun Nov 20 12:25:33 2022 +0100 @@ -356,7 +356,7 @@ " left=%u\n" " top=%u\n" " right=%u\n" - " bottom=%u\n" + " bottom=%u\n" " horizontal_resolution=%u\n" " vertical_resolution=%u\n" " reserved=%u\n" diff -r 26618bb09f5e -r 1976d2fdce7d coders/wpg.c --- a/coders/wpg.c Sat Nov 19 15:05:46 2022 -0600 +++ b/coders/wpg.c Sun Nov 20 12:25:33 2022 +0100 @@ -1037,6 +1037,62 @@ return(image); } +#define LogHeaderWPG(_WPG_HEADER) \ + (void)LogMagickEvent(CoderEvent,GetMagickModule(), \ + "WPG Header Id=%Xh:\n" \ + " DataOffset=%u\n" \ + " ProductType=%u\n" \ + " FileType=%u\n" \ + " 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) + +#define LogWPGBitmapType1(_WPG_BITMAP_TYPE1) \ + (void)LogMagickEvent(CoderEvent,GetMagickModule(), \ + "WPG Bitmap1 Header:\n" \ + " Width=%u\n" \ + " Heigth=%u\n" \ + " 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) + +#define LogWPGBitmapType2(_WPG_BITMAP_TYPE2) \ + (void)LogMagickEvent(CoderEvent,GetMagickModule(), \ + "WPG Bitmap2 Header:\n" \ + " RotAngle=%u\n" \ + " LowLeftX=%u\n" \ + " LowLeftY=%u\n" \ + " UpRightX=%u\n" \ + " UpRightY=%u\n" \ + " Width=%u\n" \ + " Heigth=%u\n" \ + " 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) + /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1067,7 +1123,6 @@ % % o exception: return any errors or warnings in this structure. % -% */ static Image *ReadWPGImage(const ImageInfo *image_info, ExceptionInfo *exception) @@ -1223,6 +1278,7 @@ Header.MinorVersion=ReadBlobByte(image); Header.EncryptKey=ReadBlobLSBShort(image); Header.Reserved=ReadBlobLSBShort(image); + if(image->logging) LogHeaderWPG(Header); if (Header.FileId!=0x435057FF || (Header.ProductType>>8)!=0x16) ThrowReaderException(CorruptImageError,ImproperImageHeader,image); @@ -1293,6 +1349,7 @@ BitmapHeader1.Depth=ReadBlobLSBShort(image); BitmapHeader1.HorzRes=ReadBlobLSBShort(image); BitmapHeader1.VertRes=ReadBlobLSBShort(image); + if(image->logging) LogWPGBitmapType1(BitmapHeader1); if(BitmapHeader1.HorzRes && BitmapHeader1.VertRes) { @@ -1345,6 +1402,7 @@ BitmapHeader2.Depth=ReadBlobLSBShort(image); BitmapHeader2.HorzRes=ReadBlobLSBShort(image); BitmapHeader2.VertRes=ReadBlobLSBShort(image); + if(image->logging) LogWPGBitmapType2(&BitmapHeader2); image->units=PixelsPerCentimeterResolution; image->page.width=(unsigned int)