Fix the source of the bug #12, and fix a new regarding bug on resize.

After reading your code I saw that the minimum sizes are calculated for the first time when _onImageLoad has not yet been executed, therefore naturalWidth and naturalHeight are 0, then the minimum sizes are miscalculated give at least an Infinity value, then when _onImageLoad is executed, the naturalWidth, naturalHeight, targetImageWidth and targetImageHeight ​​are calculated, also if the image is larger than the image viewer then enters on the if block: 

/ / Initial sizing to fit screen 
if (data.naturalHeight> (data.frameHeight - data.marginReal) | | data.naturalWidth> (data.frameWidth - data.marginReal)) {
_setMinimums data = (data); 
data.targetImageHeight = data.minHeight; 
data.targetImageWidth = data.minWidth; 
} 

then the minimum values ​​are re-calculated correctly so the targetWidth/targetHeight values are valid​​. 

The problem comes when the image is smaller than the image viewer, so never enters on the if block above and stays with minimum sizes ​​invalid (AKA Infinity), then when _updateValues ​​runs in the part "Check Max and Min image values; recenter if too small", at least one of the ifs with < data.minWidth or < data.minHeight runs because is Infinity, for example if the small image is wide the if that runs is: 

if (data.targetImageWidth <data.minWidth)...

then data.targetImageWidth is assigned to the value of minWidth, ie Infinity, and lines below when "Calculate new dimensions", ImageWidth ends up being Infinity too, with these invalid values ​​_render continuous running and scales are either Infinity or NaN, this makes the css transform is not applied.: 

data.$holder.css(_prefix("transform","translate3d (-50%, -50%, 0) scale("+scaleX+","+scaleY +")")).; <- doesn't applied because scales are invalid

What I did to prevent this is to initialize the minWidth and minHeight values ​​with naturalWidth and naturalHeight values​​, so, as it doesn't enter on the initial if block "Initial sizing to fit screen ", the minimum values ​​won't be Infinity and everything else will be calculated correctly, this solves better the bug that had patched in the previous pull request.

Another bug, when the window is enlarged, and the resize method runs and this calls "_setMinimums data = (data);" that redefines the minimum values​​, and if these minimum values ​​are higher than the actual size of the image (image small), the picture begins to change from one measure to another (because scaleX and scaleY bounce different values ​​in each _render), to avoid this, I use the same logic in each resize and minimum values ​​assigned to natural, and then only _setMinimums call when the image is larger than the new size of the image viewer, otherwise the minimum is to be maintained.  With this pull request, both bugs are fixed! Tested many times and with different screen sizes and resizing, and goes perfect. Greetings.