本文提供了一个解决方法,说明在使用对象调用该方法时该方法ImageAttributes
显示缓慢的问题Graphics::DrawImage
,以将 JPEG 或 PNG 图像绘制到打印机。
原因
当使用对象调用源图像时,该方法 Graphics::DrawImage
会将源图像转换为与设备无关的 ImageAttributes
位图(DIB)。
解决方法
若要解决此问题,请使用参数集调用Graphics::DrawImage
ImageAttributes
,NULL
除非需要指定ImageAttributes
对象。
打印机支持时,Graphics::DrawImage
ImageAttributes
调用参数NULL
设置为将源 JPEG 或 PNG 直接传递到打印机。
详细信息
- Graphics::D rawImage(Image*,constPointF*,INT,REAL,REAL,REAL,REAL,Unit,constImageAttributes*,DrawImageAbort,VOID*) 方法 (gdiplusgraphics.h)
- Graphics::D rawImage(Image*,constPoint*,INT,INT,INT,INT,INT,Unit,constImageAttributes*,DrawImageAbort,VOID*) 方法 (gdiplusgraphics.h)
- Graphics::D rawImage(Image*,constRect&,INT,INT,INT,INT,Unit,constImageAttributes*,DrawImageAbort,VOID*) 方法(gdiplusgraphics.h)
- Graphics::D rawImage(Image*,constRectF>,REAL,REAL,REAL,REAL,REAL,Unit,constImageAttributes*,DrawImageAbort,VOID*) 方法 (gdiplusgraphics.h)
- ExtEscape 函数 (wingdi.h)
- 测试打印机是否支持 JPEG 或 PNG