[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] BUG: pygame.image.save and tiff files.



Marcus von Appen wrote:
On, Tue Jan 29, 2008, Ian Mallett wrote:

On 1/29/08, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I gather pygame.image.save does not support writing tiff files. Yet it
permits a file with a '.tif' suffix to be written. The file is just in
some unknown image format.
I think that if it does not recognise the extension, it saves it as a
tga.  I've never tried to save as .tif, but I suspect that it would
save your surface as a .tga file, but with the original filename with
a .tif extension.

eg. Surface + 'Surface.tif' -> 'Surface.tif' (TGA image file)

Yes. The suffix will remain. You even can use foo.barbaz as image and it
still will be in TGA format, which is used as catchall for unrecognized
formats. However, the code needs a bit refining (each filename ending on
a 'p' will be saved as BMP), so I'll add that to the docs, when I'm
improving the filetype recognition.

Good. As long as it is documented that an unrecognized ending will default to tga. Personally I did not expect tiff output support. I just wanted to see if it would raise an exception for an unsupported type was specified. I suppose it also explains why a ".jpeg" is not, in fact, a JPEG.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>