11#include <QImageReader>
33 QNetworkReply *m_networkReply {
nullptr};
39 static QImage ApplyExifOrientation(QImage &image,
int orientation);
47 int IncrRef(
void)
override;
48 int DecrRef(
void)
override;
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};
uint GetCacheSize(void) const
virtual void SetChanged(bool change=true)
void setIsOriented(bool oriented)
unsigned int GetID(void) const
void SetFileName(QString fname)
static MythUIHelper * s_ui
MythPainter * GetParent(void)
void SetID(unsigned int id)
void setIsReflected(bool reflected)
QString GetFileName(void) const
void SetParent(MythPainter *parent)
Encapsulates Exif orientation processing.
General purpose reference counter.