PDA

Click to See Complete Forum and Search --> : Alternate To StrechBlt


amitabh
Nov 23rd, 2000, 07:51 AM
Is there an alternate API to StrechBlt? It seems to distort the colors on compressing the image.

Nov 23rd, 2000, 02:32 PM
You can try VB's PaintPicture method.

KENNNY
Nov 23rd, 2000, 03:30 PM
yeah but doesnt paintpicture call stretchtblt behind the scenes? :)

amitabh
Nov 24th, 2000, 02:34 AM
Surprisingly, PaintPicture does a much better job than StrecthBlt.

KENNNY
Nov 24th, 2000, 12:51 PM
yeah but its slow n horrible

Mad Compie
Nov 24th, 2000, 01:04 PM
You can use the SetStretchBltMode API for smooth shrinking (DELETE_SCANS) or enlarging (HALFTONE).

Nov 25th, 2000, 09:46 AM
Kenny: Awhile ago, Kedaman did some tests on this and PaintPicture proved to be faster.

NOTE: StretchBlt draws on DC's, whereas PaintPicture draws on StdPicture objects.

KENNNY
Nov 25th, 2000, 11:16 AM
ok i withdraw whatever i said :)

Nov 25th, 2000, 07:30 PM
Well, actually, I think StretchBlt is faster for drawing an image without any modification (in which case, you'd use BitBlt).

KENNNY
Nov 26th, 2000, 05:48 AM
yeah, cos bitblt is just a straight memcopy if you use srccopy as the op.