PrintRaw24BitBGRData

Rendering and printing

Description

Sends a bitmap to a printer device context through the driver's compressed pass-through, JPEG first and PNG as fallback

There is no plain raster fallback in this helper; when neither compressed path is available or the driver rejects the draw the function returns False without printing

Syntax

Delphi

Function PrintRaw24BitBGRData(PrinterDevice: HDC; BM: TBitmap; DrawLeft, DrawTop, DrawWidth, DrawHeight, PrintMode: Integer): Boolean;

Parameters

PrinterDeviceDevice context of the printer
BMSource bitmap whose pixels are printed
DrawLeftLeft edge of the destination rectangle in device units
DrawTopTop edge of the destination rectangle in device units
DrawWidthWidth of the destination rectangle in device units
DrawHeightHeight of the destination rectangle in device units
PrintMode0 prefers JPEG pass-through and falls back to PNG, 1 uses PNG only, 2 or higher disables both compressed paths

Return values

FalseNo compressed path was available or the draw failed
TrueThe compressed draw succeeded

Remarks

These helpers exist only on Windows; the non-Windows stubs report no support and print nothing

Availability comes from PrinterJPEGCaps and PrinterPNGCaps

See also

PrintRaw24BitBGRRect, PrinterJPEGCaps, PrinterPNGCaps, PrinterStretchDIBCaps