Rotate images with OpenCV

In an attempt to rotate an image using the image processing framework OpenCV I first came up short since there are no pure method for this operation to be found. After scouting the documentation the closest I came a rotation method was getRotationMatrix2D which in conjunction with warpAffine are able to rotate an image but only within its bounds. This was not quite the desired behaviour since I wanted the bounds to rotate aswell.