Png files, are as I know, can't contain viruses. But I think it is possible for a virus to pretend to be a png file. In any case, I think it was just a false positive, and if you aren't actually infected (you're not if Avast blocked it) then you should be just fine. But if you want to reformat, go ahead.