I am trying to make a 2D game where user selects a background image for the game. I put a 2D sprite behind all other objects and load the selected image onto that sprite. Since user selects that sprite it is an image that can vary in size. It is a 2D games so user cannot change zoom, camera position, scale, etc. How can I set scale of the background sprite so that it will occupy the scene optimally. That means that the whole background picture should be seen without trimmed edges? Is there another method to make a background image for a 2D game? All samples I have seen use some constant numbers for scaling, camera positioning, camera distance, etc. I suspect from the samples that these numbers have been put in after manual tweaking. I have tried some methods of determining sprite scale but working fine on one device does not mean that the image will be scaled properly on another. Typpically, I get black edges on one device, while on another the image is to big and has trimmed edges.