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 06:30:11 +0000


On 8 Nov 2006, at 03:27, Hubert Chan wrote:

On Wed, 08 Nov 2006 00:47:53 +0100, Fred Kiefer <address@hidden> said:

Hubert Chan schrieb:

Is there any interest in including my XPM NSImage support into
GNUstep GUI? If so, I will sign the copyright form, and rework it as
a patch against GNUstep GUI, rather than as a standalone class.  If
not, I'll probably get it into Etoile.

I would love to see support for XPM images and also many other format,
but not directly in gui.

OK, that's fine.

FWIW, I'm hoping to (eventually) also work on SVG support (using
librsvg), PDF support (using PopplerKit, and implement Apple's
NSPDFImageRep API), and DjVu support.  (Roughly in that order.)

I'd like to see a lot of image support provided with the gui library (though not actually in the library itsself). As fred suggested, filter services are ideal for this ... allowing you to provide functionality for use by all applications, without forcing those applications to actually link the code into themselves.

We rather should have it as an image filter service. Of course
somebody will have to write supporting code for that as well, but it
seems like the better solution. And it should not be to hard doing
this via the code already in NSPasteboard. But I don't have an idea on
the tasks involved in writing the filter service.

Hmm... I'm not sure exactly what an image filter service is, or why it's
needed.  Right now, I'm just registering my class using NSImageRep's
+registerImageRepClass:, so if you ask NSImage to load an XPM file,
everything works fine.  What else is needed?

My current plan is to make it into a "user defined AppKit bundle",
instead of making it a library as I'm currently doing it, so that every
app can benefit from it.

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.





reply via email to

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