Fading Memories

About

Ramblings about books and other things that will soon fade from my memory.

Boudewijn Rempt

index | rss1.0

There's more...

Creative Commons License
The original artwork is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

Categories, too

Find


Archives

Other things here at rempt.xs4all.nl

2007-02-26

Krita and Selections

I've made it onto OSNews, just by blogging :-). My webserver seems to be holding up, so let's add another Krita entry.

Right now the Krita gang is assembled on freenode, #kritaselections, to discuss the selection system we're going to design into Krita 2.0. In Krita 1.6, there's no real distinction between a selection and a mask: selections are local to layers, and there is no global selection. In a way, this is logical, because you often use the pixels in a layer (for instance with the magic wand selection) to create the selection, and because the effects of what you do with a selection of limited to a single layer -- for instance filtering, copying or transforming.

However, that's not what users are used to: every raster image application has a global selection. Besides, not being able to selection something on one layer and the use the shape of the selection on another layer is a big limitation. So the question for tonight is: will we keep the per-layer selection, move to a global selection, or combine the two?

And at the same time -- how about masks? Technically, a mask is just a selection with an associated filter -- most often an alpha transparency filter. Of course, that makes a mask the same thing as an adjustment layer. Again, technically, you'd not even need a separate mask in Krita, just create a group layer with a pixel layer and an adjustment layer on top of the pixel layer. That's also probably how OpenRaster will save these things -- if Oyvind Kolas gets his druthers. If Bart Coppens gets his, they won't. It's too early to tell.

As I'm typing, every team member is giving their position, and we've also got a Real User, Ronan Zeegers, who creates the icons for our toolbox, to give his.


Aaaaaaaaaaaaaaaaargh

Irina's blasted Dell laptop is broken again. It was repaired April 2006. So, after slightly less than a year, it's a goner again. This time when you try to boot it, it quickly reboots, reboots, reboots, reboots -- repeat ad infinitum. It's even quite hard to really shut it down, it reboots that fast.

So, what now? Another fight with Dell for another ten months of Inspiron 5150 usages or shell out for a new laptop? If the latter it will not be a Dell!


2007-02-24

More Krita News

Krita progress over the past few months has been slower than I'd have liked, for a couple of reasons: porting to Qt4 was quite hard, integrating with the rest of KOffice demanded porting all our tools (more than 20), the canvas classes needed to be rewritten and so on. Lots of groundwork with little progress to show for it. Boring work, too. And we're missing the work of some people who were really important for 1.5 and 1.6 but who are now too busy with work or university to be able to do much work. And I haven't been really fit myself for months.

But! Banish the gloom! There are some really cool and interesting developments. Not only have we got a most impressive ToDo, sometimes items even get done! I already mentioned the flake integration. But there's more...

Casper Boemann moved Krita's color model library from Krita to KOffice proper, renaming it to Pigment. Then Cyrille Berger refactored it to use C++ templates, something that has been on the ToDo for a long, long time. The result? When I casually mentioned that having a 16 bits XYZ colorspace would be nice to have, Cyrille committed one in less than an hour. It used to take us a whopping day, sometimes even two, to add a colorspace to Krita. And Pigment is not just a thin wrapper around lcms: Pigment colorspaces have all kinds of extra methods to mangle pixels, like convolutions, computing averages, adjusting contrast and brightness, compositing pixels.

Anders Lund has spent quite a bit of time porting Krita's tools to the new KOffice-wide tool system (which was based on Krita's tool architecture but got morphed out of all recognition). Still, there's a lot of tools that still need to be ported.

I have been working on multithreading and on the canvas. Recompositing the image now happens in threads, and I've ported Gwenview's excellent and fast scaling. What this means is that Krita is now as good as Photoshop at showing line art zoomed out. Here's a small part of a big grayscale tiff image I found somewhere on the web (but I have forgotten where). It's from a tutorial someone on the #koffice irc channel pointed me at.

Gimp svn at 9%Krita 1.6.2 at 8.33%
Photoshop 7, 9%Krita trunk, 6%

What else? Cyrille has added a dynamic brush paintop plugin -- this will be able to lots of cool things while painting. There's even a bit of gui to start defining your custom brushes, but it's not finished yet. There's progress on the OpenRaster front, code progress, but also progress of a different kind: at the Libre Graphics Meeting 2007 in Montreal, Cyrille, Oyvind Kolas and me will meet with Louis Suarez-Potts from the OASIS Adoption Technical Committee for ODF and the ODF Alliance. Exciting times -- let's break the stranglehold of .psd!

I'm working on making it possible -- even easy -- to use OpenGL shaders to write filters. I'm taking my inspiration from QShaderEdit for a large part, together with the tutorials from gpgpu.org However, in order to do that, I first had to fix Krita's OpenGL canvas (to share the OpenGL context), and for that I had to fix the KOffice-wide canvas controller, and so on. It'll be a while before I can finally start working on my beloved Chinese Brush paint plugin!

On the 1.6 front, Casper Boemann has fixed almost all remaining issues with our transform code (that rotates, shears and scales). Ben Schleimer has created a framework for plugins that use the Poisson math thingy to do cool stuff like restoring bits of an image covered by letters:

Before:
After:

And there's more going onbe, but that's for another blog on another day!


2007-02-23

Krita as a shape

The main effort for KOffice 2.0 is the flake library -- an attempt to integrate the various parts of KOffice as tightly as possible. Some time ago I managed to make Krita a flake shape provider, that is, create a shape that embeds a Krita image. You can't do much with it except load an image, display it, rotate, stretch & shear it. The next part will be much more interesting: choosing which Krita tools to provide to other applications, so it will be possible to paint or filter the Krita image shape right inside, say, Karbon.

At the same time, Emanuele Tampioni, who started hacking on Krita with last year's Summer of Code, has begun working on making shapes show up in Krita. This is a much more complex proposition: in the rest of KOffice all painting is done through Qt. Every shape gets handed a QPainter object and paints itself. But in Krita, we have this stack of layers that get composited using special code. Qt cannot do that for us, because Qt only knows 8 bit rgb and only a subset of all possible composition operations. So, we have to find a way to make it possible for shapes to paint themselves on Krita layers.

That will make it possible to mix shape layers and paint layers (together with group layers, adjustment layers and who knows what else), which is pretty cool and will make working with text and vector art inside Krita really easy to understand. The main thing we need for that is to reimplement QPaintEngine so it can work on a KisPaintDevice.


A very weird feeling...

As long as I've had the right to vote, I've always been able to say "I didn't vote for these idiots" whenever a cabinet minister did something silly or evil. Being a natural born conservative about social issues -- I want everything to stay the way it was in the seventies -- for the first ten years of my life as a voter I voted Green Left. Then, about nine years ago when I got fed-up with some of Green Left's sillier shibboleths I switched allegiance to a party with about as little chance of ever getting into the cabinet. Or so I thought.

Well, the easy times are over. No longer for me the old cop-out "who voted for these idiots? Not me!"


2007-02-20

New toy!

I recently bought a cheapo scanner, a Canon ScanScan LiDE25. Our old scanner had broken down, giving red and blue lines all along the left side, and, besides, it dated from our Windows-only era, which means 1994 or so. The LiDE 25 was cheap at about 60 euros, and, surprise!, easier to use under Linux than anywhere else. I mean, all you need to do is plug the usb cable in, and start one of the scan apps that come with any decent distribution. Works out of the box... No need to first install software from a bundled CD or anything.

I've tested three applications: the lamented unmaintained Kooka, the equally unmaintained QuiteInsane and XSane. Kooka cannot use the scanner's 16 bit mode, which is, of course, extremely important because I've finally got a way to create 16 bit images to test Krita with. Quiteinsane claims to be abler to do 16 bit images, but cannot, really. Probably uses QImage inside. XSane does do 16 bit and, although all apps use Sane, gives the best results. A pity, because I liked the way QuiteInsane worked a bit better.

Using the scanner also shows that the panel on my Thinkpad Z60m has a really horrible orange cast, while the Philips LCD monitor we recently bought has a green cast. Looking at the image on the screen or our old Dell laptops shows that the scanner is all right and that those Dells, despite their many faults have brilliant screens.

Still: here's my new wallpaper, a painting by Pieter Claesz, originally scanned at 16 bit/channel and 300dpi, massaged and cropped in Krita: