This code converts a GeoTif in rgb format to about 5% of its original size by combining gdal raster programs. The original ground sampling distance is kept. However, fuzzy image edges may occur due to the applied jpeg lossy compression. All meta data information is transferred. Image pyramids can be created and stored internally in the image. The original file will not be overwritten if not explicitly defined.