pythonwin in memory device context
Fredrik Lundh
fredrik at pythonware.com
Thu May 1 12:06:21 EDT 2003
Ilariu Raducan wrote:
> If source and destination have the same size, it looks good
> If destination is smaller then the source, it loose some of the colors.
> It looks like an image with saturated colors.
PIL uses Windows' standard "stretching mode", which appears to be
BLACKONWHITE (pick the *darkest* source pixel for each output pixel).
not sure if PythonWin allows you to call the SetStretchBltMode function
on the DC; if it does, setting the mode to COLORONCOLOR should do the
trick.
if not, use PIL's resize or transform(EXTENT) method to resize the image
before blitting it (or add a SetStretchBltMode call to PIL's libImaging/Dib.c
and rebuild...)
</F>
More information about the Python-list
mailing list