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,
70 {
return static_cast<int64_t
>(bytesPerLine()) * height(); }
83 QSize size,
const QColor &begin,
84 const QColor &end,
uint alpha,
87 void SetID(
unsigned int id) { m_imageId = id; }
88 unsigned int GetID(
void)
const {
return m_imageId; }
90 void SetFileName(QString fname) { m_fileName = std::move(fname); }
96 void SetIsInCache(
bool bCached);
100 return (m_cached) ? sizeInBytes() : 0;
105 static void MakeGradient(QImage &image,
const QColor &begin,
106 const QColor &end,
int alpha,
110 bool m_changed {
false};
113 bool m_isGradient {
false};
114 QColor m_gradBegin {0x00, 0x00, 0x00};
115 QColor m_gradEnd {0xFF, 0xFF, 0xFF};
116 int m_gradAlpha {255};
119 bool m_isOriented {
false};
120 bool m_isReflected {
false};
122 unsigned int m_imageId {0};
126 bool m_cached {
false};