Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDI+ DrawImage() with transparent bitmap to a printer

Tags:

windows

gdi+

Does anybody have any pointers on how to successfully draw a bitmap that has an alpha channel using Graphics::DrawImage() when the Graphics context is created based on a printer HDC? The printer drivers don't generally support alpha blending - so is there an alternative to rendering everything to an offscreen bitmap and just sending that to the printer. This is often not feasible, especially for high res printing to large format printers.

like image 586
solsberg2 Avatar asked Nov 15 '22 17:11

solsberg2


1 Answers

What kind of printer is that? Regular printers don't print white. Create in-memory image and 'flatten' it (remove alpha channel) and then print the result.

like image 60
codeguru Avatar answered Dec 20 '22 14:12

codeguru