Thinking about large files.

Boudewijn Rempt boud at valdyas.org
Mon Jun 13 22:20:10 CEST 2005


On Monday 13 June 2005 22:11, Bart Coppens wrote:
>
> > (although we should store, when an image gets above a certain size, an
> > .png file of the rendered image that we can quickly load and display, and
> > then we
>
> If I recall correctly, this is what the gimp does. (I thought it actually
> cut the entire render in pieces again, to let them load and save the
> (re)renderings faster, but I'm not sure about that).

Yes, I think that we should do that. It's not hard, we do something similar 
with the preview you get in konqueror.

>
> I think we should actively let krita load the file in the background. That
> way, the file is loaded much faster, thus giving the user faster a
> completely loaded image to work with.
> Also, it seems that when loading images with ImageMagick, IM first loads
> the entire image into its own memory (I think, but it seems reasonable to
> conclude that from the added memory krita uses while loading). 

Oh, that's for certain: we first construct an ImageMagick Image and that loads 
the entire thing into memory. I guess that around this time next year we'll 
have our own filters for frequently occuring fileformats like tiff and xcf. I 
tried to get hold of the photoshop file format specification, but that's 
behind a rather onerous license now.

>
> Didn't we used to have a (not implemented) class that was supposed to do
> stuff like this? 

That's correct. And I've also some code by Mosfet that does something like 
this.

> I think a tiles cache is the way we should do it. Convert 
> everything to a format the datamanager can read efficiently, and dump parts
> of that on disk. As for the caching part itself: I think there are some
> nice algorithms for that (because they are extensively used in operating
> systems). The 'Least Recently Used' and 'Clock' algorithms come to my mind,
> but I don't know how well they'd fit in krita design.

Fun for a CS student!

> On undo information: I recently found this screenshot of the gimp:
> http://developer.gimp.org/screenshots/gimp-misc.png
> Note the "Clear Undo History" dialog on the right, with an estimate of
> memory usage that will be freed. That would probably be a nice thing to
> have in krita as well (though keeping track of the size would be hard, I
> fear)

Not at all: just (count of the tiles in a memento) * pixelsize * tilewidth * 
tileheight / 1024 * 1024. Not entirely accurate, but accurate enough. Of 
course, we also need an undo panel with a nice undo slider and a clear undo 
history button for in our dockers.

-- 
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/20050613/c12c78b3/attachment.pgp


More information about the kimageshop mailing list