Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
images.hpp
Go to the documentation of this file.
1//
2// Created by kj16609 on 3/2/23.
3//
4
5#pragma once
6#ifndef ATLAS_IMAGEMANAGER_HPP
7#define ATLAS_IMAGEMANAGER_HPP
8
9#include <QPixmap>
10
11#include <filesystem>
12
13#include "core/Types.hpp"
15#include "core/exceptions.hpp"
16
17class QByteArray;
18
19template < typename T >
20class QFuture;
21
23{
24 ImageManagerException( const char* const msg, const std::source_location loc = std::source_location::current() ) :
25 AtlasException( msg, loc )
26 {}
27};
28
30{
31 ImageImportError( const char* const msg, const std::source_location loc = std::source_location::current() ) :
32 ImageManagerException( msg, loc )
33 {}
34};
35
37{
38 ImageSaveError( const char* const msg, const std::source_location loc = std::source_location::current() ) :
39 ImageManagerException( msg, loc )
40 {}
41};
42
44{
45 ImageLoadError( const char* const msg, const std::source_location loc = std::source_location::current() ) :
46 ImageManagerException( msg, loc )
47 {}
48};
49
50namespace atlas::images
51{
53 void cleanOrphans();
54
55 QImage blurImage( const QImage& image, qreal blur_radius, bool quality_blur, bool alpha_only, int transposed = 0 );
56 QPixmap
57 blurPixmap( const QPixmap& pixmap, qreal blur_radius, bool quality_blur, bool alpha_only, int transposed = 0 );
58
59} // namespace atlas::images
60
61#endif //ATLAS_IMAGEMANAGER_HPP
Definition Game.hpp:17
Definition blurhash.cpp:16
QImage blurImage(const QImage &image, const qreal blur_radius, bool quality_blur, bool alpha_only, int transposed)
Definition images.cpp:43
QPixmap blurPixmap(const QPixmap &pixmap, qreal blur_radius, bool quality_blur, bool alpha_only, int transposed)
Definition images.cpp:49
void cleanOrphans()
Clears all images not found attached to any record.
Definition images.cpp:23
ImageImportError(const char *const msg, const std::source_location loc=std::source_location::current())
Definition images.hpp:31
ImageLoadError(const char *const msg, const std::source_location loc=std::source_location::current())
Definition images.hpp:45
ImageManagerException(const char *const msg, const std::source_location loc=std::source_location::current())
Definition images.hpp:24
ImageSaveError(const char *const msg, const std::source_location loc=std::source_location::current())
Definition images.hpp:38
AtlasException(const char *const msg, const std::source_location loc=std::source_location::current())
Definition exceptions.hpp:26