Thank your for you answer.
I understand you point, but I don't want the user (I mean the UI lib user/ a developper) to manage the 1x or 2x paint. With your solution, the problem is still the same, at a moment, the user will need to generate the picture with a specific image (1x or 2x). But i want to avoid this selection from the user by doing it automatically.
Why I need to do it at runtime and not at program startup is because the final application user may have a retina screen and a normal screen, and switch his application from a screen to another.
The part of scaling from normal screen to retina screen is already done one the other calls (scaling x2). But in the case of the images, we want to replace an image(with, height) with another image(width * 2, height * 2), not a simple scale (more details etc...).