[gdal-dev] Motion: Approve RFC90: Direct access to compressed raster data

Even Rouault even.rouault at spatialys.com
Mon Jan 16 12:39:53 PST 2023


H Sean,

>
> If we don't want to think about official media types at all, which 
> might be a good idea, couldn't we use driver names instead? "JPEG; 
> foo=bar" instead of "image/jpeg; foo=bar" for example.

Initially I had used driver names + a char** papszOptions for 
ReadCompressedData(), but I also needed characteristics of the format to 
be returned in the list of strings of GetCompressionFormats(). So I 
figured out that using a single string with a MIME type syntax could 
suit both purposes while being (or maybe just looking) more standard. 
The reasoning was that parameters are not really driver specific, but 
are about characteristics of the underlying format (you could request 
"image/jpeg;foo=bar" to the JPEG, JPEGXL or GTiff drivers). But indeed 
this is a "mime type-like" syntax, not necessarily a strictly IANA 
conforming one. Given that this is intended to be mostly a GDAL internal 
implementation detail for inter-driver communication, I don't think 
adhering strictly to IANA rules is critical But I have no strong opinion 
and changing that to using driver-like names without the "image/" prefix 
isn't a big deal if you feel that is better.

Even


-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list