mirror of
https://github.com/YACReader/yacreader
synced 2025-05-27 10:50:27 -04:00
21 lines
414 B
C
21 lines
414 B
C
#ifndef RESIZE_IMAGE_H
|
|
#define RESIZE_IMAGE_H
|
|
|
|
#include <cmath>
|
|
#include <QPixmap>
|
|
#include <QImage>
|
|
|
|
enum class ScaleMethod {
|
|
QtFast,
|
|
QtSmooth, // Bilinear
|
|
Bicubic,
|
|
Lanczos,
|
|
Area
|
|
|
|
};
|
|
|
|
QPixmap smartScalePixmap(const QPixmap &pixmap, int width, int height);
|
|
QPixmap scalePixmap(const QPixmap &pixmap, int width, int height, ScaleMethod method = ScaleMethod::QtSmooth);
|
|
|
|
#endif // RESIZE_IMAGE_H
|