Ok, I take that back :) I was looking at the PIL code and it takes the extension (jpeg) as a format option but I hadn't considered the case where you were not using PIL. But in either case, I now realize the final image name is being created incorrectly regardless of whether PIL is used or not.
Paul On 25-Oct-07, at 9:08 AM, Christopher Schmidt wrote: > 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. > > No. > > 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. > > Regards, > -- > Christopher Schmidt > MetaCarta +-----------------------------------------------------------------+ |Paul Spencer [EMAIL PROTECTED] | +-----------------------------------------------------------------+ |Chief Technology Officer | |DM Solutions Group Inc http://www.dmsolutions.ca/ | +-----------------------------------------------------------------+ _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
