Use outerWidth/outerHeight

Change calculation of image size based on outerWidth/outerHeight to ignore the container's padding. See issue #11.
fix merge conflicts
Merge branch 'reddo-patch-1'