|
-
Oct 30th, 2001, 04:29 PM
#1
Thread Starter
Addicted Member
Edit Image In Memory
Im making a small app that assembles images, and the only function i need to add is a pixel check (To see if 1 pixel is like another)(For Transparency). If i use a picture box control it slows down only checking 5 - 8 per second, because it updates them. How could i check the pixels faster?
-
Oct 30th, 2001, 05:22 PM
#2
Addicted Member
If you use VBs PSet and Point methods, use API instead (GetPixel, SetPixelV). This will speed up the things a bit. Also, set the AutoRedraw of the picture box to True, hide the picture box, update the image and then show it.
-
Oct 31st, 2001, 04:19 AM
#3
Retired VBF Adm1nistrator
Also make sure you're not doing anything stupid in your loops.
Optimize the loops as much as possible. eg. Use the Long data type as the counter.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 31st, 2001, 12:41 PM
#4
Hyperactive Member
using copymemoryAPI to read the picture in might make the operations go quicker too
-
Oct 31st, 2001, 02:10 PM
#5
transcendental analytic
Copymemory will duplicate, to random access the memory you need to cheat vb using an array pointer to point to the memory location instead.
check out Unlimited realities for tutorials on how to do this:
http://www.ur.co.nz/
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
|