mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Add a new module for resizing images including Lanczos
This commit is contained in:
19
image_processing/resize_image.h
Normal file
19
image_processing/resize_image.h
Normal 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
|
||||
Reference in New Issue
Block a user