Ok here is a trick.
gdal_translate -of vrt in.tif out.vrt
The VRT is a tiny ascii header with all the needed metadata. Now edit the *.tif, add graphics, save it with the same name, but don't make it bigger or smaller... Once done:
gdal_translate out.vrt new.tif
-- this will add back the "geo" to the tiff.
Say you need to edit a PNG.
gdal_translate -of PNG -ot byte -scale in.tif (or in.cub) out.png
gdal_translate -of VRT out.png out.vrt
edit png same as before and to make a geotiff again
gdal_translate out.vrt out_geo.tif
Check out the VRT. It can be magically for virtual clips, map projections, scales, mosaics, band ordering ...
-Trent
GDAL needs to be used with: