With The Case Of  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
ActiveX COM Products
Technical Support
  General Q & A
Discussion Board
Contact Us


Get Ready to Unleash the Power of UCanCode .NET

UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"

VC++ Tutorial: High quality image rotation (rotate by shear)

 By Eran Yariv.
  • Unlike traditional rotation of images, where every n'th pixel is sampled and copied to the result image, this template provides much more accurate image rotation features (weighing the pixels).

    template is instantiated with a specific pixel format and must be inherited to support pixel access functions for a specific bitmap implementation. This provides abstaction of the rotation mechanism from the actual bitmap representation.

    Major features:

    • ides professional quality image rotation.

    • Code is optimized for image quality, not speed.

    • Rotated image retains size and aspect ratio of source image (destination image size is usally bigger).

    • Supports double precision rotation angles (0..360).

    • Supports generic bitmap structures. Specific bitmap structure is defined by inheritance.

    • Template based - no need for libraries, DLLs etc. No linkage problems.

    How to use the rotation template:

    You must derive you own class from the rotation template.

    For example:

    class CRotateByShearRGB : public CRotateByShear<COLORREF>

    will define a concrete class where each pixel is of COLORREF type.

    Next, you must override 5 abstract functions which support creation, destruction of bitmap buffers and pixel level access to the bitmap buffers.

    Then you instantiate your derived class and call the AllocAndRotate(...) function which allocates a new destination bitmap buffer and rotates the input image into it.

    That's it.

    For further instructions please view the attached sample command-line project (Rotate.cpp). It is a simple command line utility which reads PPM (ASCII or binary) image file into a DIB structure, rotates it and saves it to another PPM image file.

  • Download source code


    Copyright ?1998-2022 UCanCode.Net Software , all rights reserved.
    Other product and company names herein may be the trademarks of their respective owners.

    Please direct your questions or comments to