[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    A bug in KisTransformWorker
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2011-12-23 13:53:33
Message-ID: CAEkBSfWvBQ+fJQKy3RYodM0+5h9PFc5bUzBERY8vsgkfADZ4+Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Hello!<br><br>There is a really weird bug in the KisTransformWorker. [1]<br><br>I \
don&#39;t know how to fix it actually. The bug happens because of the following \
reasons:<br><br>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:<br> 2) We cannot always fill extra pixels with transparent color, \
because it&#39;ll create transparent lines when doing scaling operations. See the \
following commit and bug by Boemann [2].<br>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.<br> <br>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&#39;t solve the actual problem.<br> <br>Probably, someone has any \
idea about this.<br><br><br>[1] - <a \
href="https://bugs.kde.org/show_bug.cgi?id=289645">https://bugs.kde.org/show_bug.cgi?id=289645</a><br \
clear="all">[2] - <a \
href="http://quickgit.kde.org/?p=calligra.git&amp;a=commit&amp;h=f3ec1515819470c15d1c0 \
bec32e8e25af8560cf7">http://quickgit.kde.org/?p=calligra.git&amp;a=commit&amp;h=f3ec1515819470c15d1c0bec32e8e25af8560cf7</a><br>
 [3] - <a href="https://bugs.kde.org/attachment.cgi?id=67060">https://bugs.kde.org/attachment.cgi?id=67060</a><br><br>-- \
<br>Dmitry Kazakov<br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic