mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
Implement lanczos for upscaling to get crispier images
This commit is contained in:
20
image_processing/resize_image.h
Normal file
20
image_processing/resize_image.h
Normal file
@ -0,0 +1,20 @@
|
||||
#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
|
Reference in New Issue
Block a user