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

Frank Warmerdam warmerdam at pobox.com
Fri Apr 13 17:34:53 EDT 2012


Ethan,

It only happens if there appears to be a valid mask on the source
image that gets copied by gdal_translate in a CreateCopy() call to the
jpeg driver.  There are various reasons a source might or might not
have a mask.

Best regards,
Frank

On Fri, Apr 13, 2012 at 2:31 PM, Ethan Alpert <ealpert at digitalglobe.com> wrote:
> 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.
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the gdal-dev mailing list