Hi!
When I run this code:
dim DC as long
DC = LoadDC("C:\1.bmp")
for Y = 0 to 600
for X = 0 to 800
setpixel form1.hdc, X, Y, getpixel(DC,X,Y)
next X
next Y
It runs slowly, like a powerpoint switching pictures.
why?
Thank you,
Arie. (mag.up.co.il)
Printable View
Hi!
When I run this code:
dim DC as long
DC = LoadDC("C:\1.bmp")
for Y = 0 to 600
for X = 0 to 800
setpixel form1.hdc, X, Y, getpixel(DC,X,Y)
next X
next Y
It runs slowly, like a powerpoint switching pictures.
why?
Thank you,
Arie. (mag.up.co.il)
It's because Setpixel and Getpixel are two very slooooow operations.
See the thread about getting pixels of a large area really quickly. Suggested is a pointer method to make it go fast. Although an 800x600 picture still takes about 1.5 seconds.
Lookup bitblt in msdn :D