Thank you so much!!!You are right, when I changed the image size from 10MB to 50KB, I got the wanted time----about 5-6 times fasterI didn't know the memory access is so time consuming before.I can move forward now, thanks again.