Scaling Images Question

Hey guys, hoping you can help with an image scaling question.
I have an image that is 172 pixels tall by 124 pixels wide. (172x64). When divided by 2 (iPhone game, using Resolution Independence) those numbers are even. Looks awesome in the creator.
I have a function that scales my actor based on the Y position as it moves up and down. I use the height and width of the actor times a number that looks good based on the scaling necessary for the scene minus the location of the actor on the Y and then divide it all by that same arbitrary number.
Constrain
self.Size.Height to 86*(300-self.position.Y)/300
Constrain
self.Size.Width to 62*(300-self.position.Y)/300
UPDATE: New Problem. The scaling seems to cancel my resolution independence and I fear the retina display quality. Any way around that?
SOLVED (sorta): Looks like it only looks jaggedy in the creator but in the ad hoc version it is perfect.
Old Problem: The actor image looks jagged when this scaling is applied. Is it because the actor is being considered 86x62 and those tow numbers are not even when divided by 2? Is it Gamesalad's scaling that makes them look jagged and not smooth when shrinking and growing them actively?
Is there a better way to scale the images as the actor moves?
Hopefully you guys have some answers or solutions to help me out! I would definitely appreciate the help.
I have an image that is 172 pixels tall by 124 pixels wide. (172x64). When divided by 2 (iPhone game, using Resolution Independence) those numbers are even. Looks awesome in the creator.
I have a function that scales my actor based on the Y position as it moves up and down. I use the height and width of the actor times a number that looks good based on the scaling necessary for the scene minus the location of the actor on the Y and then divide it all by that same arbitrary number.
Constrain
self.Size.Height to 86*(300-self.position.Y)/300
Constrain
self.Size.Width to 62*(300-self.position.Y)/300
UPDATE: New Problem. The scaling seems to cancel my resolution independence and I fear the retina display quality. Any way around that?
SOLVED (sorta): Looks like it only looks jaggedy in the creator but in the ad hoc version it is perfect.
Old Problem: The actor image looks jagged when this scaling is applied. Is it because the actor is being considered 86x62 and those tow numbers are not even when divided by 2? Is it Gamesalad's scaling that makes them look jagged and not smooth when shrinking and growing them actively?
Is there a better way to scale the images as the actor moves?
Hopefully you guys have some answers or solutions to help me out! I would definitely appreciate the help.
Comments
Basically, does the following break resolution independence?
Image size 172x124.
Put into the iPhone game goes to 86x62.
Function used:
Constrain
self.Size.Height to 86*(300-self.position.Y)/300
Constrain
self.Size.Width to 62*(300-self.position.Y)/300
Does the above function that changes the actor scaling on the Y axis based on how high or low it is break the resolution independence? It feels to me like it is, but perhaps I'm just doing something wrong.