hyperion.ng/include/utils/ImageResampler.h
Murat Seker a18ccb8b48
Refactor color utils (#955)
Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
2020-08-08 13:22:37 +02:00

30 lines
712 B
C++

#pragma once
#include <utils/VideoMode.h>
#include <utils/PixelFormat.h>
#include <utils/Image.h>
#include <utils/ColorRgb.h>
class ImageResampler
{
public:
ImageResampler();
~ImageResampler();
void setHorizontalPixelDecimation(int decimator);
void setVerticalPixelDecimation(int decimator);
void setCropping(int cropLeft, int cropRight, int cropTop, int cropBottom);
void setVideoMode(VideoMode mode);
void processImage(const uint8_t * data, int width, int height, int lineLength, PixelFormat pixelFormat, Image<ColorRgb> & outputImage) const;
private:
int _horizontalDecimation;
int _verticalDecimation;
int _cropLeft;
int _cropRight;
int _cropTop;
int _cropBottom;
VideoMode _videoMode;
};