I am creating an application on Kinect using XNA framework. It creates problem When I add High Resolution images, it only shows half of the image on the screen or 25% of the image if its extreme high resolution image, but if i upload 360X480 size of image it gives me complete image.
I am running the application on full screen at 46" TV.
Kindly tell me why its not displaying complete image if i upload image more than 360X480 resolution.
public Game1()
{
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferHeight = 1280;
graphics.PreferredBackBufferWidth = 720;
graphics.IsFullScreen = true;
EDIT
I am loading and drawing the images using the following code.
defaultShirt= Content.Load<Texture2D>("kurta6");
currentShirt = defaultShirt;
spriteBatch.Draw(currentShirt, new Rectangle
(shirtXposition + x + 90, shirtYposition + y + 50, customShirtHeight + 160,
customShirtWidth + 140),
new Rectangle(0, 0, 480, 360),
Color.White, 0, origin, SpriteEffects.None, 1);
I am also adding the images from database using the following method.
if (_image1Path[i] != "")
{
using (System.IO.FileStream stream = new System.IO.FileStream("D:/xampp/htdocs/boutique_cms/" + _image1Path[i], System.IO.FileMode.Open))
{
_image1Display[i] = Texture2D.FromStream(GraphicsDevice, stream);
currentImagePath = _image1Display[i];
}
}
Thanks
As said above you are cutting down the rectangle to the rectangle(0, 0, 480, 360) What you need is to do this.
This will draw the image and scale it to fit in the area specified below.
spriteBatch.Draw(currentShirt, new Rectangle
(shirtXposition + x + 90, shirtYposition + y + 50, customShirtHeight + 160,
customShirtWidth + 140), Color.White);