pythonwin in memory device context
Ilariu Raducan
lale at fotonation.com
Thu May 1 13:26:23 EDT 2003
Thank you very much for sharing your knoledge with me.
As the requirements for my application are not very strict I used the
first suggestion and resized the image in another image object and then
draw it on the client area.
On my PC is fast enough :)
Thank you again.
Regards,
Lale
Fredrik Lundh wrote:
> 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