How to get an absolute media (image) path programmatically by a relative path

A post was split to a new topic: Is «catalog/product/cache/1/image/265*265» a full filesystem path?