gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XPM support for NSImage


From: Richard Frith-Macdonald
Subject: Re: XPM support for NSImage
Date: Wed, 8 Nov 2006 10:03:14 +0000


On 8 Nov 2006, at 07:31, Hubert Chan wrote:

On Wed, 8 Nov 2006 06:30:11 +0000, Richard Frith-Macdonald <address@hidden> said:

[...]

I think what Fred probably intended was to have a lot of filter
services available for different image file formats.  Then in the gui
library have an NSImageRep subclass which would use any filter service
as required.  That way, the only extra code in the gui library (and
hence linked in to apps) would be the little bit letting the
NSImageRep use filter services.  The gui package could install a set
of image filters, but other packages/applications would also be able
to supply more or better filters.  When the gui needs to convert from
format A to B it would just ask the NSImageRep to do it, and that
would automatically pick one of the available filters to perform the
actual conversion.

Ah, OK. So the idea is to use the service to, say, convert an XPM to a
PPM, and use the PNM loading code that is already in gui.

Yes ... or PNG or TIFF etc.

Sounds a bit
inefficient, but I guess it would allow us to reuse a lot of code from
netpbm (or maybe even just create a wrapper around the netpbm programs).

Yes.

This would probably work for a simple bitmap format such as XPM, but it
probably wouldn't work so well for, say, SVG, where we would want to
keep all that vector goodness, or for PDF, where the Apple API includes
extra methods like -setCurrentPage:.

But if we could take advantage of netpbm (and ImageMagick), we would
have free support for an insane number of file formats.

Another thing is, does this also allow for writing files?

Not directly ... but it would be easy to take data in one image format, filter it to produce data in another format, then write the resulting data to file.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]