[OpenLayers-Dev] jpeg vs jpg
crschmidt at metacarta.com
Thu Oct 25 09:08:21 EDT 2007
On Thu, Oct 25, 2007 at 08:57:02AM -0400, Paul Spencer wrote:
> No. TileCache saves the image with a .jpg extension but uses 'jpeg'
> for the mime type of the returned content. The underlying library,
> PIL, will do that automagically for you.
1. PIL is not neccesarily involved in transactions. It is only used
with meta-tiling, so invoking the name of PIL here is irrelevant.
2. The last parts of the diskcache key are:
"%03d.%s" % (int(tile.y) % 1000, tile.layer.extension)
3. The Layer class converts the extension:
if extension.lower() == 'jpg': extension = 'jpeg' # MIME
self.extension = extension.lower()
Jachym is right. The Layer.TileCache is wrong.
More information about the Dev