11 #include <QImageReader>
33 QNetworkReply *m_networkReply {
nullptr};
39 static QImage ApplyExifOrientation(QImage &image,
int orientation);
50 virtual void SetChanged(
bool change =
true) { m_changed = change; }
57 void Assign(
const QImage &img);
58 void Assign(
const QPixmap &pix);
64 void Resize(QSize newSize,
bool preserveAspect =
false);
65 void Reflect(
ReflectAxis axis,
int shear,
int scale,
int length,
80 QSize size,
const QColor &begin,
81 const QColor &end,
uint alpha,
84 void SetID(
unsigned int id) { m_imageId = id; }
85 unsigned int GetID(
void)
const {
return m_imageId; }
87 void SetFileName(QString fname) { m_fileName = std::move(fname); }
93 void SetIsInCache(
bool bCached);
97 #if QT_VERSION < QT_VERSION_CHECK(5,10,0)
98 return (m_cached) ? byteCount() : 0;
100 return (m_cached) ? sizeInBytes() : 0;
106 static void MakeGradient(QImage &image,
const QColor &begin,
107 const QColor &end,
int alpha,
111 bool m_changed {
false};
114 bool m_isGradient {
false};
115 QColor m_gradBegin {0x00, 0x00, 0x00};
116 QColor m_gradEnd {0xFF, 0xFF, 0xFF};
117 int m_gradAlpha {255};
120 bool m_isOriented {
false};
121 bool m_isReflected {
false};
123 unsigned int m_imageId {0};
127 bool m_cached {
false};