Sweden-Number/dlls/user32/tests
Zhiyi Zhang 04b4d0f380 gdi32: Partially implement HALFTONE stretch mode.
COLORONCOLOR(STRETCH_DELETESCANS) was used in place of HALFTONE. COLORONCOLOR mode may delete rows
of pixels without trying to preserve information so it will cause Wine to render poorly when the
destination rectangle is small.

According to tests, HALFTONE mode uses box filter when doing integer downscaling and nearest
neighbor interpolation when doing upscaling in both horizontally and vertically. In other cases,
HALFTONE mode uses a lanczos3 like algorithm to interpolate pixels. There are also other heuristics
involved. For example, shrinking a 2x2 image to 1x1 may not use box filter depending on image data.
Since this algorithm is undocumented, it's difficult to reverse engineer the original algorithm and
produce identical results. Instead, this patch uses a naive implementation of bilinear interpolation
to implement HALFTONE mode and it produces good quality images.

For 8-bit and lower color depth images, nulldrv_StretchBlt should resize the images first and then
converts color depth.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:55 +02:00
..
Makefile.in
bmp1x1_32bpp.bmp
broadcast.c
class.c
clipboard.c user32/tests: Use the caller line number for open_clipboard() & co. 2021-06-11 18:45:44 +02:00
combo.c
cursoricon.c gdi32: Partially implement HALFTONE stretch mode. 2021-06-15 20:43:55 +02:00
dce.c user32: Add clipping region tests on window resize. 2021-03-18 22:04:01 +01:00
dde.c
dialog.c
edit.c user32/tests: Trace GetLastError() when OpenClipboard() fails in edit. 2021-05-28 21:54:19 +02:00
generated.c
input.c user32/tests: Recreate the window to make it more likely to have focus. 2021-05-14 20:56:10 +02:00
listbox.c
menu.c
monitor.c gdi32: Return correct color depth for display DCs in GetDeviceCaps(). 2021-06-07 21:31:54 +02:00
msg.c user32/tests: Use int for wait_move_event delay type. 2021-05-20 22:05:32 +02:00
resource.c
resource.rc
scroll.c
static.c
sysparams.c user32/tests: Fix a typo in a comment. 2021-05-28 21:54:08 +02:00
test_mono.bmp
text.c
uitools.c
win.c user32: Implement InternalGetWindowIcon(). 2021-05-24 11:42:37 +02:00
winstation.c
wsprintf.c