Click to See Complete Forum and Search --> : Bitblt & Stretchblt
billboomop
Nov 4th, 2000, 07:16 AM
I have recently discovered Bitblt and Stretchblt. They are great, a little slow, but great. I was wondering, how can you blt a picture that is in another file stored on the HD? Also, would using these two APIs be the best choice, or is there a better choice?
John
kedaman
Nov 4th, 2000, 07:21 AM
For resizing pictures i suggest you use paintpicture method instead, it's faster and doesn't screw up the colors as stretchblt might do, although there are some flags you can set using setstretchbltmode but paintpicture is still faster.
No you can't blit to a file on a harddrive, you need to load the file into a bitmap using loadpicture and then attach it to DC or use a picturebox, then you can blit to it, and save it with savepicute
billboomop
Nov 4th, 2000, 08:00 AM
With your suggestion, can you make it so that the bitmap isn't visible to the person using the program?
kedaman
Nov 4th, 2000, 08:10 AM
If you want to use the picturebox, you could set its visible property to false and autoredraw to true, theres a way to do it with apis too, then you don't need a picturebox either :)
billboomop
Nov 4th, 2000, 08:21 AM
How can you do it solely with API's?
kedaman
Nov 4th, 2000, 08:48 AM
YEs, you can go look at this thread:
http://forums.vb-world.net/showthread.php?threadid=37669
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.