compare image dimensions and then the screen full size dimensions (divide imageHeight/fullsizeHeight), do the same for width.
image.scaleY = Number(imageHeight/fullsizeHeight);
image.scaleX = Number(imageWidtht/fullsizeWidtht);
then all the if statements with the expections so it will fill screen, too lazy to write them down, but you get the idea, right?
Very Happy to hear from you , but still my query does not solved. I have tried your method but it is not providing as required. In order to clear understand the issue, I m attaching the image and also mentioned the details inside the image . Please go through serial order as mentioned inside the image which will easy to understand.
Thank you ,