[Gdal-dev] Re: gdal fails on vrt (virtual raster) file

WolfgangZ wollez at gmx.net
Wed Sep 5 10:48:28 EDT 2007


Frank Warmerdam schrieb:
> WolfgangZ wrote:
>> Hi,
>>
>> Gdal fails on my virtual raster file that links to JPEG graphics. Map 
>> size is 17121x12100 pixel and 13.8 MB of filesize (JPEG images).
>>
>> Here the command (but also gdal_translate fails with the same error):
>>
>> D:\DOP>gdalinfo referenz.vrt
>> ERROR 1: libjpeg: Failed to create temporary file
>> gdalinfo failed - unable to open 'referenz.vrt'.
>> Open GDAL Datasets:
>>   1 N DriverIsNULL 512x512x0
>>
>> Any help is welcome.
>> Wolfgang
> 
> Wolfgang,
> 
> This is an issue in the JPEG driver.  It seems that libjpeg tries to
> create a temporary file when an operation (like processing a progressive
> jpeg) would require quite a bit of memory.  If it fails to create the file
> you get the message you see.
> 
> I recently changed the amount of memory at which this happens to be 500MB
> instead of 1MB in the builtin libjpeg for GDAL (SVN trunk)
> 
>   http://trac.osgeo.org/gdal/changeset/11706
> 
> If you are building GDAL from source, then you might want to apply the
> same change.
> 
> It might also be sufficient to copy the jpeg file to a directory where
> you have read-write access.
> 
> Best regards,

this patch is probably not jet applied in the FWTools. But I'm wondering 
why even gdalinfo needs to create a temporary file? Why is there the 
need from gdalinfo or gdal_translate to read in the full image? Do I 
understand that that limit equals the maximum file size that can be 
handled? Where is this temporary file usually generated? I'm working on W2k.

Kind regards
Wolfgang





More information about the Gdal-dev mailing list