GerbV (Gerber Viewer): How to do PNG export of only area within board outline?
Since image processing using GIMP is an option for you, I am posting this as an answer.

From the comments: 


  PNG format is capable of non-rectangular graphics (i.e., for example a circular image with a transparent/non-existent background)


This is not exactly true. PNG supports only rectangular graphics. There is no non-existing background concept. PNG uses alpha-transparency, which essentially allows to set the transparency for each pixel.


  "flooding/subtracting the surroundings programmatically would be OK for me, except how would I choose exactly that area?"


Using GIMP, its easy to get this result in a matter of seconds.


To select the area around the PCB border you want to make transparent, I used the Magic Wand / Fuzzy selection tool. Go to "Tools" > "Selection Tools" > "Fuzzy Selection" (keyboard shortcut "U"). Then click on the respective area. Use the "Threshold" setting to set the range of color variations that are included in the selection.
In the Layer window, select Layer - Transparency - Add Alpha Channel.  If this is blanked out then your image is already set to store transparency data. 
Select Edit - Clear.  This makes the previous selection transparent. 
When you save the file, make sure `Save colour values from transparent pixels' is selected.