Change image size & transform tool
Michael Thaler
michael.thaler at ph.tum.de
Thu Jun 23 18:43:11 CEST 2005
On Thursday 23 June 2005 13:09, Casper Boemann wrote:
> Not really, no. It's basically just the scaling with an offset.
I thought about this a little more. Shearing an image is basically trivial.
You just shift a row in x- or y-direction. If you shift by non-integer
values, you have to interpolate, but it is still more or less trivial.
Scaling on the other hand is more complicated because the number of pixels
change and you have to interpolate somehow so that even pictures which are
enlarged or shrinked by a huge factor look good.
By combining shearing (rotating) and scaling, you basically add a trivial case
to the scaling code (that is, scaling 1:1) and on the same time you add an
offset for each row. On the other hand, you cannot use precalculations
anymore (I did not check, Casper said so), which should slow down scaling
(but I really don't how much speed gain these precalculations offer).
So I am still not convinced how much sense it makes to combine shearing and
scaling because shearing is more or less trivial anyway. On the other hand, I
am really no expert with respect to this stuff and maybe it really makes
sense to combine the two operations?
Greetings,
Michael
More information about the kimageshop
mailing list