[gdal-dev] Compression artifacts

Hare, Trent thare at usgs.gov
Thu Dec 27 08:18:53 PST 2012


Jan,
   Jpeg is a lossy compression and thus the collar will not be maintained
perfectly as black (or 0). You will not get as much compression, but you
can try a lossless method like LZW or Packbits. If you are getting close to
the 4GB limit you might need to add "-co bigtiff=if_safer".

Good luck,
Trent



On Thu, Dec 27, 2012 at 5:38 AM, Jan Hartmann <j.l.h.hartmann at uva.nl> wrote:

>  Can anyone tell me wath is happening here? I have a large three-band
> raster (3.8G) looking like this:
>
> http://mapserver.sara.nl/map2a.png
>
> I compress it (from information from this list a few days ago) with:
>
> gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR big.tif small.tif
> gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW
> YCBCR -ro -r gauss small.tif 2 4 8 16 32 64
>
> and get a file of 37M, which is nice. However, the map has all kinds of
> rubbish at the borders. It looks like this:
>
> http://mapserver.sara.nl/map2b.png
>
> The equivalent pictures of a small part of the map look like this:
>
> http://mapserver.sara.nl/map1a.png
> http://mapserver.sara.nl/map1b.png
>
> Can anyone help me?
>
> Jan
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121227/4fa2b500/attachment.html>


More information about the gdal-dev mailing list