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

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



If you'd like to add tiff write support, that'd be great.  Is that
what you were talking about looking into?


On Jan 30, 2008 8:38 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> I can look into it if you wish. As for JPEG, on Windows both the .jpg
> and .jpeg endings are used. So it is confusing if writing a .jpeg file
> fails when .jpg succeeds. It gives the impression that JPEG output is
> not supported.
>
> Lenard
>
>
> René Dudfield wrote:
> > I think it would be possible to add tiff write support... since we
> > link with libtiff.  Much in the same way png, and jpg writing is
> > supported.
> >
> > I guess we should add .jpeg detection to there as well.
> >
> > cu.
> >
> >
> > On Jan 30, 2008 8:16 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> >
> >> 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.
> >>
> >>
>
>