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

Glynn Clements glynn at gclements.plus.com
Sat Apr 28 03:32:25 EDT 2007


Maciej Sieczka wrote:

> > In spearfish:
> > 
> > $ g.region rast=vegcover
> > $ r.out.gdal input=vegcover format=GTiff type=Byte output=tmp/vegcover_jpg.tif createopt=COMPRESS=JPEG
> > 
> > 100%
> > ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG
> > ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG
> > ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG
> > ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG
> > Done!
> 
> This bug still applies. I don't know why "format=GTiff type=Byte
> createopt=COMPRESS=JPEG" do not work together. The output raster is all
> black. According to GeoTIFF spec JPEG compression should work just fine
> with integer raster: "JPEG should only be used with Byte data" [1].

I thought that I had replied to this already.

...

Oh; I did, but none of the addresses in the original message accept
replies, so it went into the bit-bucket.

> 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.




More information about the grass-dev mailing list