I have updated cgImage this morning so that the image falls completely within the axes that are placed around it. In other words, if you draw a set of axes, and then place the image on top of the axes, the axes will still be visible. You can find the updated version here:
http://www.idlcoyote.com/programs/cgimage.pro
You can test the program with code like this (Coyote Library required):
Loadct, 0, NColors=20
cgImage, BytScl(Dist(20), TOP=19), /Axes, /Keep, $
Background='sky blue', /Erase, /Window