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/']
Matlab slider has a problem that it fires callback only on MouseUp and not on MouseMove, so pure matlab implementation would always feels strange.

Better way - go for Java in Matlab. So you do not have to re-implement whole scroll logics. You can put Java Swing GUI component inside Matlab window, it is not difficult at all.

Specifically you have to use Swing `JScrollPane` Class. With Matlab `javacomponent()` function you can put it inside matlab window.

There are tons of examples on the web on how to get image into scroll pane, just browse for `JScrollPane image`. You can use Java classes inside matlab with usual Matlab syntax (no need for `new` keyword, ecc.)
There are 3 things to take care of in order to display image in its original size (1:1):

* The figure size and units.
* The axes size and units.
* The axes data aspect ratio.

Once all of that are set according to the image size even using MATLAB's `image()` function one could generate 1:1 display of an image.

Here is the sample code:

```
%% Load Data

mI = imread('7572939538_04e373d8f4_z.jpg');

numRows = size(mI, 1);
numCols = size(mI, 2);

%% Setings

horMargin = 30;
verMargin = 60; %<! Title requires more

%% Display Image

vFigPos = [100, 100, numCols + (2 * horMargin), numRows + (2 * verMargin)]; %<! [Left, Bottom, Width, Height]
vAxesPos = [horMargin, verMargin, numCols, numRows];

hFigure = figure('Position', vFigPos, 'Units', 'pixels');
hAxes   = axes('Units', 'pixels', 'Position', vAxesPos);
hImageObj = image(hAxes, mI);
set(hAxes, 'DataAspectRatio', [1, 1, 1]);
set(get(hAxes, 'Title'), 'String', {['Landscape by Roman Vanur']}, ...
    'Fontsize', fontSizeTitle);
set(hAxes, 'XTick', []);
set(hAxes, 'YTick', []);

```

The result (Based on the image - [Landscape by Roman Vanur](https://www.flickr.com/photos/80272075@N02/7572939538/)):

[![Landscape by Roman Vanur](https://i.stack.imgur.com/wo4Te.png)](https://i.stack.imgur.com/wo4Te.png)

The full code in my [Stack Overflow Q1427602 Github Repository](https://github.com/RoyiAvital/StackExchangeCodes/tree/master/StackOverflow/Q1427602).