Use clipping paths when drawing on JPG, PNG, TIFF, BMP or GIF

We create a path consisting of two nested rectangles, outer for the whole bitmap, inner for a text box. We then use that path to create a clip region and draw an image covering the whole bitmap but excluding the text box.