Add a new module for resizing images including Lanczos

This commit is contained in:
luisangelsm
2026-03-06 17:10:59 +01:00
parent fe8e1670cb
commit 61a7e3b9c6
6 changed files with 2473 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#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