Ticket #4488 (closed defect: fixed)
jpeg driver hanging in CreateCopy
| Reported by: | lpinner | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0.0 |
| Component: | GDAL_Raster | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Using GDAL 1.9.0 on Ubuntu 10.04 (64bit) and Win 7 Enterprise (64bit OS, 32 bit python & gdal).
I have some code that generates 24bit RGB or 8bit greyscale reduced resolution and stretched (using a VRT) JPEGS from our satellite imagery. I’m having an issue where CreateCopy? (and gdal_translate) is hanging.
The data I’ve had trouble with is a single band (Pan) GeoEye?-1 image: http://geoeyemediaportal.s3.amazonaws.com/assets/images/ChannelPartnerPortal/Australia/Geo_11bit/Example1.zip (500+mb, sorry). If that link doesn't work, try: http://www.geoeye.com/CorpSite/resource/sample_imagery_response.aspx
The VRT (test.vrt, also attached) is:
<VRTDataset rasterXSize="800" rasterYSize="1870">
<VRTRasterBand dataType="Byte" band="1">
<NoDataValue>0.0</NoDataValue>
<ComplexSource>
<SourceFilename relativeToVRT="0">/vsizip/Example1.zip/po_311944_pan_0000000.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="13532" ySize="31624"/>
<DstRect xOff="0" yOff="0" xSize="800" ySize="1870"/>
<ScaleOffset>-53.125</ScaleOffset>
<ScaleRatio>1.51785714286</ScaleRatio>
</ComplexSource>
</VRTRasterBand>
</VRTDataset>
The following gdal_translate command succeeds, i.e the output jpg is created and the progress meter says it’s done, but just never returns.
$ gdal_translate -of jpeg test.vrt test.jpg Input file size is 800, 1870 0...10...20...30...40...50...60...70...80...90...100 - done.
If a tif is output then the command completes and returns as expected:
$ gdal_translate test.vrt test.tif 0...10...20...30...40...50...60...70...80...90...100 - done. $
I've attached the VRT, a python script that demonstrates the same issue with CreateCopy?() and a a gdb trace run on gdal_translate (but I don't have a version of gdal with debug symbols so don't know if it's of any use).

