See this
link[
^].
From this, you can get Resolution of your Image.
Now what you have to do is, once you get the particular resolution, put a check and within it write some logic to change the image.
Hope this info will help you. Give it a try.
Good Luck :)
-KR