If your image is infact an embedded link to another site then yes Google treats those as links though not as useful as ones with text in them known as anchor text links. If you collect images on your own site and they get re-used around the web that is way to collects links, though of course you have no control over where and when such links might appear.