[gs-cvs] rev 7761 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sun Mar 4 10:25:04 PST 2007
Author: alexcher
Date: 2007-03-04 10:25:04 -0800 (Sun, 04 Mar 2007)
New Revision: 7761
Modified:
trunk/gs/src/gxiscale.c
Log:
Fix X mirroring for all color modes of the interpolated image.
The mirroring was missing from non 8 bits/colorant modes resulting
in the mirrored output images.
DIFFERENCES:
No CET or Comparefiles differences.
Modified: trunk/gs/src/gxiscale.c
===================================================================
--- trunk/gs/src/gxiscale.c 2007-03-04 17:08:25 UTC (rev 7760)
+++ trunk/gs/src/gxiscale.c 2007-03-04 18:25:04 UTC (rev 7761)
@@ -209,21 +209,27 @@
const byte *pdata = bdata;
frac *psrc = (frac *) penum->line;
gs_client_color cc;
- int i;
+ int i, j;
+ int dpd = dc * (bps <= 8 ? 1 : sizeof(frac));
+ if (penum->matrix.xx < 0) {
+ pdata += (pss->params.WidthIn - 1) * dpd;
+ dpd = - dpd;
+ }
r.ptr = (byte *) psrc - 1;
if_debug0('B', "[B]Concrete row:\n[B]");
for (i = 0; i < pss->params.WidthIn; i++, psrc += c) {
- int j;
-
- if (bps <= 8)
- for (j = 0; j < dc; ++pdata, ++j) {
- decode_sample(*pdata, cc, j);
- } else /* bps == 12 */
- for (j = 0; j < dc; pdata += sizeof(frac), ++j) {
- decode_frac(*(const frac *)pdata, cc, j);
+ if (bps <= 8) {
+ for (j = 0; j < dc; ++j) {
+ decode_sample(pdata[j], cc, j);
+ }
+ } else { /* bps == 12 */
+ for (j = 0; j < dc; ++j) {
+ decode_frac(((const frac *)pdata)[j], cc, j);
}
- (*pcs->type->concretize_color) (&cc, pcs, psrc, pis);
+ }
+ pdata += dpd;
+ (*pcs->type->concretize_color) (&cc, pcs, psrc, pis);
#ifdef DEBUG
if (gs_debug_c('B')) {
int ci;
More information about the gs-cvs
mailing list