GetPixel question

drgold

New member
Joined
Dec 31, 2004
Messages
1
My apologies if this is an FAQ, but I couldnt find any answers...
I have an image and I want to store the RGB of each pixel into a
3-dimensional array. Right now Im using the GetPixel method but Im
wondering if there is a faster way. Heres what Im doing right now,
but it runs slower than Id like:

Loop through all pixels, saving the color of each one
Dim curColor As Color
Dim nRgb(nWidth, nHeight, 2) As Integer
Dim nRed, nGreen, nBlue As Integer
For x = 0 To nWidth - 1
For y = 0 To nHeight - 1
curColor = bmpOut.GetPixel(x, y)
nRgb(x, y, 0) = curColor.R
nRgb(x, y, 1) = curColor.G
nRgb(x, y, 2) = curColor.B
Next
Next


Any suggestions? Thanks so much...

Gabe
 
Back
Top