The Affine transform IS accurate! The actual image size is not relevent! Image content is what is important here. and the Image content is correct!
The
-affine -transform operators are actually calls to the newer
+distort routine (which the older calls). This routine adds an extra pixel border around the distortion (with virtual offset (page)), to ensure that any semi-transparent edge anti-aliasing is not clipped, in the generic case.
For example if you did not just do a simple rotation, but also scaled the image by half, you will get some semi-transparent pixels around the edges, even if the original image would scale to exactly integer pixels. It also very much depends on the
-interpolation and
-filter settings that being used for the image resampling.
Examples of scaling and resizing images using Affine type transforms is covered in
IM Examples, Resizing of Scaling, Distort/Affine Resize - free-form resizing
http://www.imagemagick.org/Usage/resize/#distort
These examples are relevent regardless of if rotation is applied or not.
Your rotation by 90 degrees is a very VERY special case, and not a generic case. If you want perfect 90 degree rotations, then you are better off using
-rotate which does not include scaling or shearing components, and as such can handles 90 degree rotations as being 'special'.