Android Question GetPixel() too slow

To get help with this, please say what error you are getting and show the code that causes the error.
 
Upvote 0
To get help with this, please say what error you are getting and show the code that causes the error.
Thanks for the reply.
I get that I cannot convert NumberToString.
How do I use that function in that link?
Is that an ItemArray, An Int or something else?
I do not understand how to get values from that code...
That's my question. Thanks ^^

@klaus may undestand it
 
Upvote 0
Upvote 0
Attached you find a small example demonstrating getPixels and setPixels.
Clicking on the panel changes the color of the vertical line
 

Attachments

Upvote 0
The only thing I didn't understand is that:
Code:
        Log("-3 " & (pxlTest(pxlTest.Length - 3)))
    Log("-2 " & (pxlTest(pxlTest.Length - 2)))
    Log("-1 " & (pxlTest(pxlTest.Length - 1)))
What is this supposed to do?

pxlTest(1) gives me the first pixel... pxlTest(2) the second and so on, but I didn't understand pxlTest(pxlTest.Length - 1)
 
Upvote 0
pxlTest(pxlTest.Length - 1) gives the last pixel.
pxlTest(pxlTest.Length - 2) gives the last but one pixel.
etc.
But ".Length" is the Lenght of a string, not?
And with -1 you're cutting the last character from the string if I think right.
 
Upvote 0
pxlTest is an Array of Ints (integers) not a String !
Length is the length, number of items, of the Array !
The count begins with 0 so the first item is pxlTest(0) and the last item is pxlTest(pxlTest.Length - 1).
If you Dim an Array like Dim MyVariable(200) As Int, the last item in the array is MyVariable(199) and not MyVariable(200).
MyVariable.Length = 200, but the last item is 199 so MyVariable.Length - 1.
 
Upvote 0
Back
Top