04b4d0f380
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> |
||
---|---|---|
.. | ||
resources | ||
tests | ||
Makefile.in | ||
button.c | ||
caret.c | ||
class.c | ||
clipboard.c | ||
combo.c | ||
controls.h | ||
cursoricon.c | ||
dde_client.c | ||
dde_misc.c | ||
dde_private.h | ||
dde_server.c | ||
defdlg.c | ||
defwnd.c | ||
desktop.c | ||
dialog.c | ||
driver.c | ||
edit.c | ||
exticon.c | ||
focus.c | ||
hook.c | ||
icontitle.c | ||
input.c | ||
listbox.c | ||
lstr.c | ||
mdi.c | ||
menu.c | ||
message.c | ||
misc.c | ||
msgbox.c | ||
nonclient.c | ||
painting.c | ||
png.c | ||
property.c | ||
rawinput.c | ||
resource.c | ||
resources.h | ||
scroll.c | ||
spy.c | ||
static.c | ||
sysparams.c | ||
text.c | ||
uitools.c | ||
user32.rc | ||
user32.spec | ||
user_main.c | ||
user_private.h | ||
win.c | ||
win.h | ||
winhelp.c | ||
winpos.c | ||
winproc.c | ||
winstation.c | ||
wsprintf.c |