MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / centerPixel

Function centerPixel

tests/SphericalEffect.cpp:40–45  ·  view source on GitHub ↗

Helpers to sample pixels

Source from the content-addressed store, hash-verified

38
39// Helpers to sample pixels
40static QColor centerPixel(SphericalProjection &e, std::shared_ptr<Frame> f) {
41 auto img = e.GetFrame(f, 1)->GetImage();
42 int cx = img->width() / 2;
43 int cy = img->height() / 2;
44 return img->pixelColor(cx, cy);
45}
46
47static QColor offsetPixel(std::shared_ptr<QImage> img, int dx, int dy) {
48 const int cx = img->width() / 2 + dx;

Callers 1

Calls 2

GetImageMethod · 0.80
GetFrameMethod · 0.45

Tested by

no test coverage detected