Dim p() As Int
p = getPixels(SD.Canvas.Bitmap, 0, 0, 0, 0, SD.Canvas.Bitmap.Width, SD.Canvas.Bitmap.Height)
'Log("SizeOf(p)="&p.Length)
Dim MaxPixels As Long = p.Length
Dim TransPixels As Long = 0
For Each pdummy As Int In p
Dim alpha As Int = Bit.UnsignedShiftRight(Bit.AND(pdummy, 0xff000000), 24)
If alpha = 0 Then
TransPixels = TransPixels +1
End If
Next
Dim found As Float = (TransPixels/MaxPixels)*100
Log("Scratched= "&NumberFormat(found,0,0)&"%")