Flipping an Image

 

You can flip a DIB or Bitmap stored in memory, either horizontally or vertically. Use the FlipBitmapVertical, FlipBitmapHorizontal, FlipDIBVertical and FlipDIBHorizontal functions/methods from BiDIB DLL or OCX.

 

[C++]

 

/* Flipping an image horizontally*/

 

#include “BiDIB.h”

 

HDIB hDibNew;

 

/* 1. parameter: Handle of the DIB to flip */

 

hDibNew = FlipDIBHorizontal(hDib);

 

if (!hDibNew)

{

            // Error

}

 

[C#]

 

/* Flipping an image horizontally*/

 

long hDibNew;

 

/* 1. parameter: Handle of the DIB to flip */

 

hDibNew = BiDIB.FlipDIBHorizontal(hDib);

 

if (hDibNew == 0)

{

            // Error

}