阅读:1328回复:0
打印出全黑图
诸位大侠,小弟做了一个虚拟彩色打印机驱动程序,直接把生成的打印点阵数据存成BMP文件,我在做黑白打印的时候,可能生成正确的BMP文件,可是,当我做彩色打印时,却生成了一幅全黑图,有哪位大侠能知道我什么地方出错了吗?
以下是我填充GDIINFO的代码,请诸位指点! pGDIInfo->ulVersion = DRIVER_VERSION; pGDIInfo->ulTechnology = DT_RASPRINTER; pGDIInfo->ulLogPixelsX = 600; pGDIInfo->ulLogPixelsX = 600; pGDIInfo->ulLogPixelsY = 600; pGDIInfo->ulHorzSize = 210; pGDIInfo->ulVertSize = 297; pGDIInfo->ulHorzRes = (pGDIInfo->ulHorzSize*10/254)*pGDIInfo->ulLogPixelsX; pGDIInfo->ulVertRes = (pGDIInfo->ulVertSize*10/254)*pGDIInfo->ulLogPixelsY; pPDev->HorzRes=pGDIInfo->ulHorzRes; pPDev->VertRes=pGDIInfo->ulVertRes; pGDIInfo->szlPhysSize.cx = pGDIInfo->ulHorzRes; pGDIInfo->szlPhysSize.cy = pGDIInfo->ulVertRes; pGDIInfo->ptlPhysOffset.x = 0; pGDIInfo->ptlPhysOffset.y = 0; pGDIInfo->cBitsPixel = 8; pGDIInfo->cPlanes = 3; pGDIInfo->xStyleStep = 1; pGDIInfo->yStyleStep = 1; pGDIInfo->ulAspectX = 600; pGDIInfo->ulAspectY = 600; pGDIInfo->ulAspectXY = 600*141/100; // ~sqrt(2). pGDIInfo->denStyleStep = 600; pGDIInfo->ulNumPalReg=0; pGDIInfo->ulVRefresh=0; pGDIInfo->denStyleStep = 25; pGDIInfo->ulHTOutputFormat = HT_FORMAT_24BPP; pGDIInfo->ulHTPatternSize = HT_PATSIZE_DEFAULT; pGDIInfo->ulPrimaryOrder = PRIMARY_ORDER_CBA; pGDIInfo->flHTFlags = HT_FLAG_HAS_BLACK_DYE; |
|