-
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?
-
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.
-
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.
-
using copymemoryAPI to read the picture in might make the operations go quicker too
-
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/