The following commits modify the behaviours of the following GDI functions:
- StretchDIBits - SetDIBitsToDevice
To match more closely to that of Windows 10, build 2108, subject to the following constraints:
- The source image is not a JPEG (BI_JPEG) or a PNG (BI_PNG) image. - The source image is a *bottom-up* device-independent bitmap.
Changelog:
- v1 -> v2: add more tests, do extra work so that EMF outputs match - v2 -> v3: emf_parse_user_bitmapinfo: zero out *dst (BITMAPINFOHEADER) (gdi32: allow passing BITMAPINFO with bmiHeader.biSizeImage == 0 for EMF DC.) - v3 -> v4: no changes (resend due to borked up patch orders)
Jinoh Kang (7): gdi32/tests: Add tests for recording StretchDIBits in EMFs. gdi32/tests: Add tests for recording SetDIBitsToDevice in EMFs. win32u: fix return value of StretchDIBits for EMF DC. win32u: fix return value of SetDIBitsToDevice for EMF DC. gdi32: fix bounding box calculation for EMR_STRETCHDIBITS. gdi32: allow passing BITMAPINFO with bmiHeader.biSizeImage == 0 for EMF DC. gdi32: calculate effective number of scan lines and truncate bitmap bits for EMR_SETDIBITSTODEVICE.
dlls/gdi32/emfdc.c | 224 ++- dlls/gdi32/tests/metafile.c | 2803 +++++++++++++++++++++++++++++++++++ dlls/win32u/emfdrv.c | 11 +- 3 files changed, 3019 insertions(+), 19 deletions(-)