# How can I set an image size fully depending upon ImageSize?

I have an image assigned to myPicture

myPicture =


 Image[myPicture, ImageSize -> {500, 300}]


I get result like this, after evaluation:

My problem is that the image is not fitted to the rectangle. How can I solve that one?

-
I think you are over constraining your requirements since the aspect ratio of images is different than the aspect ratio of the space you to put it into. –  m_goldberg Nov 8 '12 at 8:33

ImageResize[myPicture, {500, 300}]


or

Show[myPicture, ImageSize -> {500, 300}, AspectRatio -> 3/5]


or, more generally,

Show[myPicture, ImageSize -> {500, 300}, AspectRatio -> Full]


-
I hope you don't mind. I just did not want to waste a new answer to such a one-liner. –  István Zachar Nov 8 '12 at 9:44
@IstvánZachar No problem - I prefer answers to comments anyway :) –  cormullion Nov 8 '12 at 9:45
A good preference, indeed :) –  István Zachar Nov 8 '12 at 9:56