A bug in KisTransformWorker

Dmitry Kazakov dimula73 at gmail.com
Fri Dec 23 13:53:33 UTC 2011


Hello!

There is a really weird bug in the KisTransformWorker. [1]

I don't know how to fix it actually. The bug happens because of the
following reasons:

1) We fill extra pixels on the edge of the image with the value of the last
pixel of the image. That makes the transform worker think that the border
pixel should be fully opaque, but that should not be so. Actually, this
could be easily fixed with filling these extra pixels with fully
transparent color, if there was no next point:
2) We cannot always fill extra pixels with transparent color, because it'll
create transparent lines when doing scaling operations. See the following
commit and bug by Boemann [2].
3) The next trouble is that even if we fill the extra pixels with
transparent color, two of four image edges will still be ugly. This happens
because dstLen is too small. Like in the previous point, hardcoding bigger
value for dstLen will brake scaling.

I feel that there is a solution for this to handle all the cases without
special switches or hacks. We use integer maths here, so, I think, it just
should be brought into the order somehow. Some rounding probably... The
only thing I managed to achieve is this patch [3]. But it surely doesn't
solve the actual problem.

Probably, someone has any idea about this.


[1] - https://bugs.kde.org/show_bug.cgi?id=289645
[2] -
http://quickgit.kde.org/?p=calligra.git&a=commit&h=f3ec1515819470c15d1c0bec32e8e25af8560cf7
[3] - https://bugs.kde.org/attachment.cgi?id=67060

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20111223/ae5c6824/attachment.html>


More information about the kimageshop mailing list