18 const int InWidth = InImg.
Width();
19 const int InHeight = InImg.
Height();
20 const int WidthDiff = OutImg.
Width()-InWidth;
21 const int HeightDiff = OutImg.
Height()-InHeight;
22 assert(WidthDiff >= 0);
23 assert(HeightDiff >= 0);
24 const int HalfWidthDiff = WidthDiff/2;
25 const int HalfHeightDiff = HeightDiff/2;
26 OutImg.
ChangeROI(HalfWidthDiff, HalfWidthDiff+InWidth,
27 HalfHeightDiff, HalfHeightDiff+InHeight);
void ChangeROI(const int StartX, const int EndX, const int StartY, const int EndY)
Definition: img.h:1006
void CopyFromBuf(T *pBuf)
Definition: img.h:1218
int Width() const
Definition: img.h:135
void Reflect(CImg< T > &InImg, CImg< T > &OutImg)
Definition: reflect.h:17
int Height() const
Definition: img.h:138
void ReflectToROI()
Definition: img.h:1139
T * pBuffer()
Definition: img.h:148