First - that picture is not from the movie.
Second - it's not actually Harry and Hermione kissing. It's a vision shown to Ron by one of Voldemort's Horcruxes essentially to get him pissed off at Harry and Hermione.
In the book, IIRC, he sees them make out for a bit, and the vision ends.
As it's meant to be traumatizing for Ron, it was decided to have them naked in the movie in order to make it even more traumatizing.
However, no actual nudity is seen, from what I understand. It is, after all, a PG-13 "family" movie.