On 2013-03-20 16:45, Krzysztof KosiĆski wrote:
2013/3/20 Jasper van de Gronde <th.v.d.gronde@...528...>:
On 19-03-13 14:27, Tavmjong Bah wrote:
Let's be honest, 0.49 isn't going to happen soon. There is no sign that anybody is tackling the bitmap scaling problem from either the Inkscape or the Cairo side. And even if Cairo were to have the API's needed today it will be awhile before there is a Cairo release with them.
I had a look yesterday, and I might be able to hack in something specifically for the display of bitmaps (image elements). Would this be sufficient for now? (In terms of fixing our bitmap scaling issues.)
When it comes to hacks, the best we can do without changing Cairo is to separate the image transform into a pure scaling part and rotation/skew part, do the scaling part on our side if it's a decimation, and do the rotation/skew part with Cairo. This will give acceptable results in 90% of cases (usually big images such as photos have an uniform scale and no rotation or skew), but the output will be less-than-ideal results for skewed and rotated images.
I just committed something along those lines. I've tested all sorts of transforms, and most of the time it looks fine. For all sorts of reasons it is not ideal (you want to do all resampling operations in one go, ideally), but it will probably suffice for now.
(In case anything is wrong with the code, I probably won't respond very quickly during the next couple of days.)