Source code download of the series of articles titled "Image Processing--high quality and fast image rotation at any angle"
HouSisong@GMail.com 2009.03.09
Tag: image rotation, arbitrary angle, neighbor sampling interpolation, quadratic linear interpolation, cubic convolution interpolation, alphablend, color mixing
Abstract:
Here we provide source code downloads for the series of articles "Image Processing-from any angle to high-quality and fast image rotation;
Contains the complete project source code that can be compiled. This article briefly describes the source code;
Body:
The source code download of the image rotation series is provided here; other blog articles may be provided in the future.
The source code is downloaded, but no special articles are used to describe the updates. Please pay attention to the update logs of the articles;
A: Public description of the simple demo framework of Image Processing
(This text is copied from the article "Image Processing-color conversion to grayscale Speed Optimization)
No blog articles on Image Processing I wrote previously have complete code that can be compiled and run,
But only the key core code is listed. Some netizens often read my articles, but because they cannot actually run them,
In this way, I do not have a deep understanding of the Code, nor can I port the code to my project for use.
The image processing series of blog posts build a simple small framework; I name it hgraphic32,
It will be as small as possible. It is mainly used for demonstration and only supports the argb32 color. It can load and save BMP image files
Compile and run multiple compilers and platforms;
<Hgraphic32> file description in the folder:
"Hcolor32.h": The 32-bit argb color type color32 is defined, which occupies 4 bytes and represents a color;
Tpixels32ref is the description of the image data area. It can be understood as a "Pointer" that points to the pixel area composed of color32;
Ipixels32buf is an image data zone interface used to describe an image buffer zone;
"Hpixels32.h": The tpixels32 class is defined in it. It implements the ipixels32buf interface and is used to apply for and manage a memory pixel;
"Hstream. H": The iinputstream input stream interface is defined;
The input stream interface in the ibufinputstream data area, inherited from iinputstream;
Tfileinputstream file input stream class, which implements the ibufinputstream interface;
Ioutputstream output stream interface;
Tfileoutputstream file output stream class, which implements the ioutputstream interface;
"Hbmpfile. H": it defines the tbmpfile class, which is responsible for loading BMP and saving BMP;
The "hgraphic32.h" file includes the above *. h header file, so you only need to # include "hgraphic32.h" when using it.
B: rotating items
All the test code is in the "Rotary/rotarytest. cpp" file (the command line program with the main function );
"Rotary/win_vc/rotarytest. sln" is the vc2008 project file in Windows (set the debug run directory to ".." during testing "..");
"Rotary/win_devc ++/rotarytest. Dev" is the devc ++ project file in windows;
You can also create a project by yourself, including the rotarytest. cpp file and all the files in the
The code here may be different from the code in the article, but the difference will be very small;
The code can be compiled and run smoothly in MacOSX and Linux. I have not tested it;
C: Download
Download the source code of the entire project:
Https://skydrive.live.com /? Cid = 10fa89dec380323f & id = 10fa89dec380323f! 127