问题
Is there a fast way to rotate images in .NET Compact Framework.
I've found ways to do 90, 180,270, rotations but would like to be able to rotate images free form in similar speed.
回答1:
90-, 180- or 270-degrees rotations require no calculation at all, only moving some data. On the other hand, free-angle rotations require heavy calculations. So this will never ba as fast as right-angle rotations...
回答2:
You can use OpenNetCF's ImageUtil class to do this (it's the "Rotate" method you're looking for). The method takes the bitmap and a (float) angle as parameters. Find the specs here:
http://www.opennetcf.com/library/sdf/html/eb32a9ba-c1dc-7194-bd31-a5d035790a45.htm
来源:https://stackoverflow.com/questions/875419/fast-method-to-rotate-image-in-net-compact-framework-in-c-sharp