MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / FlipImg

Function FlipImg

jni/stasm/misc.cpp:744–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744Image FlipImg(const Image& img) // in: flip image horizontally (mirror image)
745{
746 Image workimg(img.isContinuous()? img: img.clone()); // need continuous image
747 const int width = workimg.cols;
748 const int height = workimg.rows;
749 Image outimg(height, width);
750 for (int iy = 0; iy < height; iy++)
751 {
752 int width1 = iy * width;
753 int ix1 = width;
754 for (int ix = 0; ix < width; ix++)
755 outimg.data[ix + width1] = workimg.data[--ix1 + width1];
756 }
757 return outimg;
758}
759
760void FlipImgInPlace(Image& img) // io: flip image horizontally (mirror image)
761{

Callers 1

FlipImgInPlaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected