Autolayer merge done
Michael Thaler
michael.thaler at ph.tum.de
Wed Jan 12 22:28:32 CET 2005
On Wednesday 12 January 2005 20:48, Boudewijn Rempt wrote:
> KisRaindropsFilter
>
> * replace layer->widht, height with w,h from image or something like that.
>
> OilpaintFilter
>
> * replace layer -> width, height with w, h from image or something like
> that.
I really think there should be methods to get the width and the height of an
image. Both the raindrops filter and the oilpaint filter are not ideal
because they use the iterators to read the whole image to a QUANTUM array. In
principle one can solve this by making the filters use the iterators
directly.
However, there are two big issues: first, not providing width() and height()
makes it very hard to port existing filters that work on QUANTUM arrays. I
rather see some not so ideal filters that convert the whole image to a big
array first, then to see only a few filters because it is (at least for me,
and probably for other people that have not that much programming experience)
hard to convert filters to use the iterators directly.
But there is a more important reason to have width() and height(): to
implement progress info, you must know the width and the height of an image
before the calculation. It is actually quite easy to implement progress info
with the current filter framework:
just add a function
inline KisProgressSubject* progressSubject() { return m_subject; };
to kis_view.h. You can easily use this in the filter to implement progress
info in the filters, if you have the width and the height of the image. I see
no way how to implement progress info without widht() and height() functions
in kis_paint_device (the filter work on a layer, not on an image, so getting
width and height from an image does not help here).
More information about the kimageshop
mailing list