il trace (img[i]); ti da risultati corretti?