|
-
Aug 4th, 2001, 12:38 PM
#1
Thread Starter
Fanatic Member
Fast fullscreen setpixel...
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)
-
Aug 4th, 2001, 01:22 PM
#2
Good Ol' Platypus
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.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 4th, 2001, 01:53 PM
#3
transcendental analytic
Lookup bitblt in msdn
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|