[Top][All Lists]

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

Re: Filter Services

From: Nicolas Roard
Subject: Re: Filter Services
Date: Wed, 15 Feb 2012 15:26:19 -0800

2012/2/15 Fred Kiefer <address@hidden>:
> During FOSDEM Richard and I discussed the usage of filter services for image
> conversion in gui. This is an old topic and I was always to lazy to
> implement it. With Eric's image converter with Ghostscript and Imagemagik
> there was finally more than enough reason to do it. It turned out that the
> code in NSImageRep to support this was easy to write. Richard just had to
> rewrite DO for the filter service, which had been corrupted a few years
> back, and things were working. Or rather more or less so.
> I used Ink as my test platform and inserted a PS file into a document,
> getting its image converted to tiff on the way. It turns out that
> NSLayoutManager cannot handle attachments as the last character. I couldn't
> find the reason for that up to now. My example service was just a shell
> script using Ghostscript, here the problem was that Ghostscript when used
> with an output pipe cannot produce correct tiff images readable with
> GNUstep. Richard came up with the idea to write into a temporary file and
> pipe this back via cat. Next there was a problem converting the black image
> that GS produced into RGB, which I managed to track down today. Still there
> are tiff images that get displayed correctly as attachments in Ink and
> others that wont.
> So apart from these little issues filter services are working now for
> images!
> How to test it:
> All you need is a filter program and a service .plist. Attached you will
> find the ones I am using to test things. You will need to adjust the path to
> the shell script.
> That we use NSTypedFileContentsPboardType:tiff instead of NSTIFFPboardType
> is due to a limitation in the code that converts between file types and
> pasteboard types. We should fix that or rather move on to UTI.
> The next step would be to write similar support for pasteboard type
> filtering and then to add the same code in NSSound and NSMovie. Add a proper
> filter service for ImageMagik (this one would not be a shell script but
> rather a DO application). And of course to fix all the issues listed above.
> Hope you have fun with filter services,

That's super cool :)

Nicolas Roard
"I love deadlines. I like the whooshing sound
they make as they fly by." -- Douglas Adams

reply via email to

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