Helpers to sample pixels
| 38 | |
| 39 | // Helpers to sample pixels |
| 40 | static 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 | |
| 47 | static QColor offsetPixel(std::shared_ptr<QImage> img, int dx, int dy) { |
| 48 | const int cx = img->width() / 2 + dx; |
no test coverage detected