If I create some useful services like some dynamic free photos or some useful JavaScripts, for example http://www.mysite.test/ipaddress.jpg and then other websites use this image or script in their webpages... does it count for link popularity for me (inbound link) and does it increase my website ranks from google point of view?
Like Emiswelt said, no one knows Google's secret algorithms, ask a SEO.
However, most conventional crawlers only follow anchor tag hrefs.
If you search for filetype:.jpg on Google, you will not get any image results and only actual pages are shown. Images and javascripts cannot have any outbound links, and thus pagerank is probably not applicable to them.