File: thumbnail.h

package info (click to toggle)
apitrace 9.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,452 kB
  • sloc: cpp: 179,068; ansic: 55,025; python: 33,678; makefile: 103; sh: 103
file content (10 lines) | stat: -rw-r--r-- 275 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
#pragma once

#define THUMBNAIL_SIZE 64

#include <QImage>

inline QImage
thumbnail(const QImage &image, Qt::TransformationMode transformationMode = Qt::FastTransformation) {
    return image.scaled(THUMBNAIL_SIZE, THUMBNAIL_SIZE, Qt::KeepAspectRatio, transformationMode);
}