Nakedsense Posted October 7, 2010 Posted October 7, 2010 Hello, I Am Recently Writing A Program That Reads The Color Of Each Pixel In A Picture. But It Doesn't Took A Short Time. Because, I Must Read Them One By One From CPU. I Think If I Use My GPU for That Process, It Will Take Much Lesser. But I Am Not Sure If I Can Use DirectX or OpenGL to Get Color Value Of A Pixel. If I Can, Just Let Me Know That And If You Have A Documentation, Please Share It. Thank You Fatih BAKIR Quote
Leaders snarfblam Posted October 7, 2010 Leaders Posted October 7, 2010 You want to examine pixels in a Bitmap? Keep in mind that plenty of software manipulates images without the assistance of the GPU and runs at a more-than-reasonable speed. I'm guessing that your approach involves something along the lines of the GetPixel function, which is terribly slow. A better method is to copy all of the image data into an array of bytes or integers, which is very fast to access. This allows you to quickly scan through the data. Bob Powell posted a good article about this. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.