How to bind a software to a picture?

I have a software. I want to make it like it will be shown as a .jpeg, jpg or gif file. If anyone open it, he/she will only watch the image but the software also will be opened. After a huge Google searching, I found nothing. How to bind a software to a picture ?
