Can we show an image in its original size in MATLAB?

Right now when we are showing, it is exactly fitted to the image window size. However, I want to show the image in its original size. When the image is of larger size, a scroll bar should appear in the image window. This would allow the user to view the image in its original size. 

Any ideas on how to achieve this? Is this possible?
['https://Stackoverflow.com/questions/1427602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']
I believe what you're looking for is the [IMTOOL](http://www.mathworks.com/access/helpdesk/help/toolbox/images/imtool.html) utility (which is a part of the [Image Processing Toolbox](http://www.mathworks.com/products/image/)). It's a MATLAB GUI that allows you to view images in their original size (100% magnification) with horizontal and vertical sliders.

**EDIT:**

The above solution will display your image in a new figure window (the IMTOOL GUI). If you don't want the image appearing in a new window, but instead want to adjust its size in a window of your own, it will be more difficult. To adjust the size of the image, which I assume you've displayed on a set of axes using the [IMAGE](http://www.mathworks.com/access/helpdesk/help/techdoc/ref/image.html) command, you will have to adjust a number of [axes properties](http://www.mathworks.com/access/helpdesk/help/techdoc/ref/axes_props.html) for the axes containing the image. The following are the properties you will likely end up modifying:

* `'Units'`: This can be set to `'inches'`, `'centimeters'`, or `'pixels'`, for example.
* `'Position'`: This controls where the axes are placed in the figure window, in units governed by the `'Units'` property.
* `'DataAspectRatio'/'PlotBoxAspectRatio'`: These control the relative scaling of the axes and the surrounding plot box.
* `'XLim'/'YLim'`: The minimum and maximum values of the axes.

After getting the size and scaling of the image to display the way you want, parts of the image could be outside the figure window area. Unfortunately, horizontal and vertical sliders *will not* be automatically added. You will have to create these slider controls yourself using the [UICONTROL](http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uicontrol.html) function. You will have to write the callback functions for the slider controls such that they move the axes around in the window.

If you choose to venture down the above path, here are a few links to GUI design tutorials that may help you: [a slider tutorial on blinkdagger](http://blinkdagger.com/matlab/matlab-gui-tutorial-slider/), [a blog post by Doug Hull](http://blogs.mathworks.com/videos/2009/08/06/gui-tutorials-from-the-file-exchange/), and [a video from Doug on GUIDE basics](http://www.mathworks.com/matlabcentral/fileexchange/7598).
try:
 figure,imshow(your\_image), axis image
This changes the image axis to the original size