Contents of /trunk/libjpeg/patches/libjpeg-6b-rdppm.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1257 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1257 byte(s)
-import
1 | ## DP: Fix byte order issue with 16bit PPM/PGM files in rdppm.c |
2 | |
3 | diff -urNad /home/bill/debian/libjpeg/libjpeg6b-6b/rdppm.c libjpeg6b-6b/rdppm.c |
4 | --- /home/bill/debian/libjpeg/libjpeg6b-6b/rdppm.c 2003-09-08 16:44:20.000000000 +0200 |
5 | +++ libjpeg6b-6b/rdppm.c 2003-09-08 16:47:19.000000000 +0200 |
6 | @@ -250,8 +250,8 @@ |
7 | bufferptr = source->iobuffer; |
8 | for (col = cinfo->image_width; col > 0; col--) { |
9 | register int temp; |
10 | - temp = UCH(*bufferptr++); |
11 | - temp |= UCH(*bufferptr++) << 8; |
12 | + temp = UCH(*bufferptr++) << 8; |
13 | + temp |= UCH(*bufferptr++); |
14 | *ptr++ = rescale[temp]; |
15 | } |
16 | return 1; |
17 | @@ -274,14 +274,14 @@ |
18 | bufferptr = source->iobuffer; |
19 | for (col = cinfo->image_width; col > 0; col--) { |
20 | register int temp; |
21 | - temp = UCH(*bufferptr++); |
22 | - temp |= UCH(*bufferptr++) << 8; |
23 | + temp = UCH(*bufferptr++) << 8; |
24 | + temp |= UCH(*bufferptr++); |
25 | *ptr++ = rescale[temp]; |
26 | - temp = UCH(*bufferptr++); |
27 | - temp |= UCH(*bufferptr++) << 8; |
28 | + temp = UCH(*bufferptr++) << 8; |
29 | + temp |= UCH(*bufferptr++); |
30 | *ptr++ = rescale[temp]; |
31 | - temp = UCH(*bufferptr++); |
32 | - temp |= UCH(*bufferptr++) << 8; |
33 | + temp = UCH(*bufferptr++) << 8; |
34 | + temp |= UCH(*bufferptr++); |
35 | *ptr++ = rescale[temp]; |
36 | } |
37 | return 1; |