Scaling Rotation Shearing Reflection algorithms
i use EASYBMP library and i want to know the most effective开发者_高级运维 way to scale , rotate , shear and reflect algorithm. i want the most optimized to do it.
The most effective way to scale, rotate, shear and reflect is to use the power of your graphics card - for example through OpenGL.
If you still want to do bitmap pixel operations yourself, typically you do this using linear algebra. This is not super easy to figure out, so I recommend finding some good study material, for example this book.
Instead of telling you how to use EASYBMP (which looks like crap), I'm going to suggest you use Magick++ instead. It supports BMP and has all the methods you ask for built-in.
Please refer to the Wikipedia link for the transformation matrices
精彩评论