mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
20 lines
502 B
C
20 lines
502 B
C
#ifndef RESIZE_IMAGE_H
|
|
#define RESIZE_IMAGE_H
|
|
|
|
#include <QImage>
|
|
#include <QPixmap>
|
|
|
|
enum class ScaleMethod {
|
|
Nearest = 0,
|
|
Bilinear = 1,
|
|
Lanczos = 2
|
|
};
|
|
|
|
// Base scaling API — callers are responsible for supplying the correct target dimensions.
|
|
|
|
QPixmap scalePixmap(const QPixmap &pixmap, int width, int height, ScaleMethod method = ScaleMethod::Lanczos);
|
|
|
|
QImage scaleImage(const QImage &image, int width, int height, ScaleMethod method = ScaleMethod::Lanczos);
|
|
|
|
#endif // RESIZE_IMAGE_H
|