How will functions like unsharpen mask be added on?

Boudewijn Rempt boud at valdyas.org
Sat Jan 7 21:32:14 CET 2006


On Saturday 07 January 2006 21:16, Larry Marso wrote:

> It depends on krita's ambitions. 

The ultimate ambition is to allow natural media-type work. Going beyond Corel 
Painter. But it's a long, long trek because we need to get the basics, that's 
color, right first.

But even with color we're quite ambitious. We want to make it easy to write 
filters and tools that work with layers in any colorspace. No messageboxes 
telling you you need to convert your layer back to 8 bit rgba in order to use 
a function -- by design, not by duplicating work for every colorspace.

Apart from that, we're having fun, so we might reimplement something ourselves 
just to learn what makes that thing tick, or because we think we can do 
better... And of course, a native plugin can work directly with the image 
data, so there's no costly copying and piping of tens of thousands of pixels 
involved.

> The ability to pipe a layer through 
> GraphicsMagick or ImageMagick, which each of good lcms profile
> support, IIRC, and 16 bit support, would be fantastic and obviate the
> need for krita to recreate the wheel on multiple functions.

If you feel the urge, I would say it's easy to do a plugin that allowed people 
to do that :-). It would be easy, apart from the obvious implications of 
doing shell exists and piping and so on. Unless one would use the GM or IM 
api, that's a possibility, too.

Actually, Krita when it was still KImageShop was intended as a thin GUI layer 
on top of IM, and our fallback file import/export filter still uses IM.

> Importantly, there should be flexibility to access any and all of the
> functions these programs permit on the command line.

That would be a shell exit, then.

> Although GraphicsMagick has lots of advantages, there seems to be no
> progress or plans to support the sweeping capabilities of "-fx" in
> ImageMagick, a general purpose very intelligent function language that
> is fully layer and color channel enabled.
>
> I don't see the need to write some complex API based interaction here.
>  Just a way to pipe a layer in a compatible (profile aware) format
> from krita -> Image/GraphicsMagick -> krita.

Yes, all you need to do in a filter is:

Q_UINT8 * pixels = new Q_UINT8( width * height * bytesPerPixel);
dev->readBytes(pixels, 0, 0, width, height);
pipe the pixels through IM or GM
dev->writeBytes(pixels, 0, 0, width, height);

Or course, a nice GUI that allows people to select and tune functionality is
harder, as is writing safe and robust shell exit code. But it's not hard
to do.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060107/b9458765/attachment.pgp


More information about the kimageshop mailing list