There's no need to use complicated IF statements or anything like that.
It's actually a fairly straightforward math/algebra problem involving ratios -- e.g., if you have a source X value of 200 in an image with width 1000, then how far over should you be in a window of width 600? (Answer: 120. Why?)
Or, again, if you have a source X value of 122 in an image that's 300 pixels wide, then what should the X value be in a window with width 600? (Answer: 244. Why?)
You just need to generalize these examples for any source image width. You can get the width of an image by doing myImage.getWidth().