anthony wrote:
In the mean time I have downloaded and built the latest SRC RPM from the alpha area, and ran it through all IM Examples. I can now say that Affine Transformations has passed ALL my tests.
Which version is that? I grabbed a beta yesterday (6.3.2-1) and don't want to rebuild if I don't need to.
The only thing that I have left is some posible adjustments to the bounds, for correct float to interger adjustments as the image size and canvas offsets can only handle integer values. This however would only result in minor (less than a pixel) adjustments to the grossly correct results it is now achieving.
That is the final image may need to be up to 2 pixels larger to prevent the corners from being clipped, and the offsets may need to be one pixel less. The translation adjustments however should remian about right.
For me the issue of the bounds is very important. Just lately I have relied on being able to calculate the positions of the points (including the four corners of the image) as they are transformed by the affine matrix given to AffineTransform. I do this to know where to crop an image to extract certain parts after the transformation. I need it accurate to the exact pixel.
This sort of thing will need to be stable before I can use it reliably. One thing I noticed is that I will have to take into account the fact that there is rounding in the ImageMagick code for treating a pixel with coordinates (x,y) as being centered at (x+.5, y+.5). I hope that has remained consistent. Adding pixels around the edges to fix certain jaggies is one way to go, but can't it also be handled using the virtualpixel notions?
In any case, all I need is a solid, stable, clear way to predict where a pixel will end up following an affine transformation.
Can you please take a look and see what you think.
I will, just tell me the first version it shows up in.
Thanks for your work on this, Anthony, I know this is an important matter to finish. But please be careful that it is mathematically predictable for delicate use!
Are you making changes to any of the other functions in that family, such as Rotate, XShear, YShear?
Rick