Can you prevent upscaling when using Craft's image transforms?
As found here, this actually seems to be a requested feature that is not yet implemented. However, in the link given, Brandon also supplied a workaround for the time being:

{% set transform = {
width: min(150, image.width),
height: min(100, image.height)
} %}

&lt;img src="{{ image.getUrl(transform) }}"&gt;