[gdal-dev] Problem with garbage bytes of data after EOI marker in single band JPEG

Ethan Alpert ealpert at digitalglobe.com
Fri Apr 13 17:31:43 EDT 2012


Ok why does this not happen with multi band jpgs?

 

From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Friday, April 13, 2012 1:13 PM
To: gdal-dev at lists.osgeo.org
Cc: Ethan Alpert
Subject: Re: [gdal-dev] Problem with garbage bytes of data after EOI marker in single band JPEG

 

Le vendredi 13 avril 2012 19:53:41, Ethan Alpert a écrit :

> 

> This has been running for years. Recently a customer who receives these

> started scanning the JPG's for security threats. Turns out that the

> JPG's I've been writing have garbage data after the JPEG EOI marker.

> 

This is not garbage, but mask data appended after the JPEG data stream, as documented in the JPEG driver doc : 

"""The driver also supports the "zlib compressed mask appended to the file" 

approach used by a few data providers to add a bitmask to identify pixels that 

are not valid data."""

The mask is due to the advertized nodata value in the VRT. You can likely remove it by adding <HideNoDataValue>1</HideNoDataValue> in the VRT file under the VRTRasterBand element.


This electronic communication and any attachments may contain confidential and proprietary 
information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee 
responsible for delivering this communication to the intended recipient, or if you have received 
this communication in error, please do not print, copy, retransmit, disseminate or 
otherwise use the information. Please indicate to the sender that you have received this 
communication in error, and delete the copy you received. DigitalGlobe reserves the 
right to monitor any electronic communication sent or received by its employees, agents 
or representatives.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120413/f15c31f2/attachment-0001.html


More information about the gdal-dev mailing list