[gs-commits] rev 12272 - trunk/ghostpdl/pl
henrys at ghostscript.com
henrys at ghostscript.com
Thu Mar 10 16:29:19 UTC 2011
Author: henrys
Date: 2011-03-10 16:29:18 +0000 (Thu, 10 Mar 2011)
New Revision: 12272
Modified:
trunk/ghostpdl/pl/dwmainc.c
Log:
For PCL's benefit we change the display format to DISPLAY_BIGENDIAN -
RGB instead of BGR. PCL raster operations will not work with the BGR
color model. This does introduce byte shuffling, BGR is native, which
might make the device a bit slower.
CLUSTER_UNCHECKED
Modified: trunk/ghostpdl/pl/dwmainc.c
===================================================================
--- trunk/ghostpdl/pl/dwmainc.c 2011-03-10 16:27:04 UTC (rev 12271)
+++ trunk/ghostpdl/pl/dwmainc.c 2011-03-10 16:29:18 UTC (rev 12272)
@@ -1022,27 +1022,27 @@
}
{ int format = DISPLAY_COLORS_NATIVE | DISPLAY_ALPHA_NONE |
- DISPLAY_DEPTH_1 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
+ DISPLAY_DEPTH_1 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST;
HDC hdc = GetDC(NULL); /* get hdc for desktop */
int depth = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL);
sprintf(ddpi, "-dDisplayResolution=%d", GetDeviceCaps(hdc, LOGPIXELSY));
ReleaseDC(NULL, hdc);
if (depth == 32)
format = DISPLAY_COLORS_RGB | DISPLAY_UNUSED_LAST |
- DISPLAY_DEPTH_8 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
+ DISPLAY_DEPTH_8 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST;
else if (depth == 16)
format = DISPLAY_COLORS_NATIVE | DISPLAY_ALPHA_NONE |
- DISPLAY_DEPTH_16 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST |
+ DISPLAY_DEPTH_16 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST |
DISPLAY_NATIVE_555;
else if (depth > 8)
format = DISPLAY_COLORS_RGB | DISPLAY_ALPHA_NONE |
- DISPLAY_DEPTH_8 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
+ DISPLAY_DEPTH_8 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST;
else if (depth >= 8)
format = DISPLAY_COLORS_NATIVE | DISPLAY_ALPHA_NONE |
- DISPLAY_DEPTH_8 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
+ DISPLAY_DEPTH_8 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST;
else if (depth >= 4)
format = DISPLAY_COLORS_NATIVE | DISPLAY_ALPHA_NONE |
- DISPLAY_DEPTH_4 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
+ DISPLAY_DEPTH_4 | DISPLAY_BIGENDIAN | DISPLAY_BOTTOMFIRST;
sprintf(dformat, "-dDisplayFormat=%d", format);
}
nargc = argc + 2;
More information about the gs-commits
mailing list