Loading an image

Boudewijn Rempt boud at valdyas.org
Fri Feb 17 09:21:10 CET 2006


We seem do be doing a little too much work when loading an image:

This is what happens from selecting an image until it's shown:

krita: updateCanvas calls paintView
QPainter::begin: Cannot paint null pixmap
krita: zoomAroundPoint calls resizeEvent
	krita: resizeEvent called: reported w, h: 1027, 1, zoom: 1, doc w, h: 5312, 
		1874, zoomed doc w, h: 5312, 1874, ruler thickness: 216
krita: canvasRefresh calls paintView
krita: setCurrentImage calls resizeEvent
	krita: resizeEvent called: reported w, h: 1027, 1, zoom: 1, doc w, h: 5312, 	
		1874, zoomed doc w, h: 5312, 1874, ruler thickness: 0
krita: updateCanvas calls paintView
QPainter::begin: Cannot paint null pixmap
krita: resizeEvent called: reported w, h: 1027, 1, zoom: 1, doc w, h: 5312, 
		1874, zoomed doc w, h: 5312, 1874, ruler thickness: 0
QLayout "unnamed" added to QWidget "unnamed", which already has a layout
krita: resizeEvent called: reported w, h: 965, 617, zoom: 1, doc w, h: 5312, 
		1874, zoomed doc w, h: 5312, 1874, ruler thickness: 0
	krita: resizeEvent calls paintView
		krita: Going to render to Painter
			krita: Render to painter 0, 0 : 948, 600
krita: zoomAroundPoint calls resizeEvent
	krita: resizeEvent called: reported w, h: 965, 617, zoom: 0.166667, doc w, h: 
			5312, 1874, zoomed doc w, h: 886, 313, ruler thickness: 0
		krita: resizeEvent calls paintView
			krita: Going to render to Painter
				krita: Render to painter 0, 0 : 5311, 1873
krita: canvasRefresh calls paintView
	krita: Going to render to Painter
		krita: Render to painter 0, 0 : 5311, 1873
krita: resizeEvent called: reported w, h: 931, 617, zoom: 0.166667, doc w, h: 
		5312, 1874, zoomed doc w, h: 886, 313, ruler thickness: 0
	krita: resizeEvent calls paintView
		krita: Going to render to Painter
			krita: Render to painter 0, 0 : 5311, 1873


This dwarfs the problem that when the zoom < 1.0 we first color correct all 
pixels and then scale, although I want to fix that too.

Of course, simply selecting a tool that makes the dockers a little wider 
triggers:

krita: resizeEvent called: reported w, h: 634, 617, zoom: 0.166667, doc w, h: 
5312, 1874, zoomed doc w, h: 886, 313, ruler thickness: 0
	krita: resizeEvent calls paintView
		krita: Going to render to Painter
			krita: Render to painter 0, 0 : 3803, 1873

Instead of simply reusing what was already on the canvasPixmap.

What I propose to try is -- but it's not the kind of thing I'm good at:

* paint only once on loading
* when (really) resizing, reuse already rendered parts of the canvasPixmap, 
just like   when scrolling.
* colorcorrect after downscaling if zoom < 1.0

-- 
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/20060217/7b6db8e4/attachment.pgp 


More information about the kimageshop mailing list