Fixed bug in which the src dimensions would use incorrect values if destination dimensions were smaller than the original texture dimensions.