I'm confused here. Are you asking if it's ok to download an image of someone and masturbate to it?
When someone posts an image of themselves in public space (like MySpace, FaceBook, etc), I think the images become 'Public property', so you're free to download it and do whatever you want with it.
If you're asking if it's (morally) okay to do this, well, I think morals are very personal . So, you have to ask yourself that question and decide for yourself if this action hurts anyone or violates someone elses wishes, by which I mean would they consent to what you're doing? Unlike a porn star, who, by their actions in the movie, are really giving consent, or a stranger, where consent cannot be gotten, your friend is someone who you see and deal with every day. If you can ask her might be something you'd rather not, so you're left having to reconcile your desires with your conscience. Let us know how you make out.