• Zhiyi Zhang's avatar
    gdi32: Partially implement HALFTONE stretch mode. · 04b4d0f3
    Zhiyi Zhang authored
    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=46375Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    04b4d0f3
Name
Last commit
Last update
..
dibdrv Loading commit data...
enhmfdrv Loading commit data...
mfdrv Loading commit data...
tests Loading commit data...
uniscribe Loading commit data...
Makefile.in Loading commit data...
bidi.c Loading commit data...
bitblt.c Loading commit data...
bitmap.c Loading commit data...
brush.c Loading commit data...
clipping.c Loading commit data...
dc.c Loading commit data...
dib.c Loading commit data...
driver.c Loading commit data...
enhmetafile.c Loading commit data...
font.c Loading commit data...
freetype.c Loading commit data...
gdi32.rc Loading commit data...
gdi32.spec Loading commit data...
gdi_private.h Loading commit data...
gdiobj.c Loading commit data...
icm.c Loading commit data...
mapping.c Loading commit data...
metafile.c Loading commit data...
opengl.c Loading commit data...
opentype.c Loading commit data...
painting.c Loading commit data...
palette.c Loading commit data...
path.c Loading commit data...
pen.c Loading commit data...
printdrv.c Loading commit data...
region.c Loading commit data...
resource.h Loading commit data...
vertical.c Loading commit data...
vulkan.c Loading commit data...