Man took pic of young girl in swimsuit: court