[GRASS-dev] Re: [grass-code I][329] r.out.gdal: COMPRESS=JPEG yields "ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG"

Maciej Sieczka tutey at o2.pl
Sat Apr 28 06:27:40 EDT 2007


Glynn Clements wrote:
> Maciej Sieczka wrote:
> 
>>>> r.out.gdal creates paletted images (i.e. the map data is saved as a
>>>> single band; it isn't expanded to RGB).
>>>>
>>>> Note that the argument to creatopt= is passed directly to GDAL. 
>>>> r.out.gdal has no knowledge of which options are allowed or
>>>> meaningful, so it's up to the user not to pass options which won't work.
>> I guess I comply.
>>
>> In spearfish:
>>
>> $ g.region rast=vegcover
>> $ r.out.gdal in=vegcover format=GTiff type=Byte
>> out=tmp/vegcover_jpg.tif createopt=COMPRESS=JPEG
>>
>>
>> Is there something wrong with: "format=GTiff type=Byte
>> createopt=COMPRESS=JPEG" when exporting an integer raster, value range 1-6:
> 
> Yes; the use of createopt=COMPRESS=JPEG.
> 
>> In spearfish:
>>
>> $ r.info -t vegcover
>> datatype=CELL
>>
>> $ r.info -r vegcover
>> min=1
>> max=6
>>
>> in the context of what GDAL's GeoTIFF spec says: "JPEG should only be
>> used with Byte data"?
>>
>> [1]http://www.gdal.org/frmt_gtiff.html
> 
> r.out.gdal creates paletted images, to which JPEG compression cannot
> be applied.
> 
> IOW, regardless of which other options you use,
> createopt=COMPRESS=JPEG will always result in an error.

OK. Closing bug as invalid.

Maciek




More information about the grass-dev mailing list