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

2012-04-13 Thread Ethan Alpert
I have a very old GDAL based tool I wrote that creates JPEG thumbnails for GeoTiff's. Since the GeoTiff's can be any size and I used a perl script to compute the aspect ratio so I can center a reduced size image in a square thumbnail. I'm looking for any suggestions as to how I can look into

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

2012-04-13 Thread Even Rouault
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,

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

2012-04-13 Thread Ethan Alpert
Ok why does this not happen with multi band jpgs? From: Even Rouault [mailto:even.roua...@mines-paris.org] Sent: Friday, April 13, 2012 1:13 PM To: gdal-dev@lists.osgeo.org Cc: Ethan Alpert Subject: Re: [gdal-dev] Problem with garbage bytes of data after EOI marker in single band JPEG Le

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

2012-04-13 Thread Frank Warmerdam
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