GraphicsMagick: magick/wpg.c: Fix incorrect TrX and TrY elements...
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.40515.1639840723.1346.graphicsmagick-commit@lists.sourceforge.net> |
changeset a1e2429fb5fa in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=a1e2429fb5fa summary: magick/wpg.c: Fix incorrect TrX and TrY elements in CTM. diffstat: ChangeLog | 6 ++++++ coders/wpg.c | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diffs (43 lines): diff -r 0ae6efa44c38 -r a1e2429fb5fa ChangeLog --- a/ChangeLog Tue Dec 14 16:34:25 2021 -0600 +++ b/ChangeLog Sat Dec 18 16:16:34 2021 +0100 @@ -1,3 +1,9 @@ +2021-12-18 Fojtik Jaroslav <[email protected]> + + * magick/wpg.c: Fix incorrect TrX and TrY elements in CTM. + Backported from WP2LaTeX: https://hg.osdn.net/view/wp2latex/wp2latex/rev/ce47149e7e67 + + 2021-12-14 Bob Friesenhahn <[email protected]> * utilities/tests/convert.tap: Use sed to count file lines rather diff -r 0ae6efa44c38 -r a1e2429fb5fa coders/wpg.c --- a/coders/wpg.c Tue Dec 14 16:34:25 2021 -0600 +++ b/coders/wpg.c Sat Dec 18 16:16:34 2021 +0100 @@ -21,7 +21,7 @@ % % % Software Design % % Jaroslav Fojtik % -% June 2000 - 2018 % +% June 2000 - 2021 % % Rework for GraphicsMagick % % Bob Friesenhahn % % Feb-May 2003 % @@ -793,13 +793,10 @@ } if(Flags & TRN) { - x=ReadBlobLSBLong(image); DenX=ReadBlobLSBShort(image); /*Tx*/ - if(x>=0) (*CTM)[0][2] = (float)x+(float)DenX/0x10000; - else (*CTM)[0][2] = (float)x-(float)DenX/0x10000; - x=ReadBlobLSBLong(image); DenX=ReadBlobLSBShort(image); /*Ty*/ - (*CTM)[1][2]=(float)x + ((x>=0)?1:-1)*(float)DenX/0x10000; - if(x>=0) (*CTM)[1][2] = (float)x+(float)DenX/0x10000; - else (*CTM)[1][2] = (float)x-(float)DenX/0x10000; + DenX=ReadBlobLSBShort(image); x=ReadBlobLSBLong(image); /*Tx*/ + (*CTM)[0][2] = (double)x + (float)DenX/0x10000; + DenX=ReadBlobLSBShort(image); x=ReadBlobLSBLong(image); /*Ty*/ + (*CTM)[1][2] = (double)x + (float)DenX/0x10000; } if(Flags & TPR) {