55 {
59 {
61 reader.setDecideFormatFromContent(true);
62 image = reader.read();
63
65 reader.setAutoDetectImageFormat(true);
66 image = reader.read();
67 }
68
69 }
70
73 }
74
80
83 }
86 } else {
88 }
89 }
91 }
92
93
94
95
96#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
97 if (
image.colorSpace().colorModel() != QColorSpace::ColorModel::Rgb || !
image.colorSpace().isValid()) {
98 image.convertToColorSpace(QColorSpace(QColorSpace::SRgb));
99 }
100#else
101 image.convertToColorSpace(QColorSpace(QColorSpace::SRgb));
102#endif
103
104 return (!
image.isNull());
105 }
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
bool openPath(const QString &path, OpenFlags flags=None)
openPath Open a Path
QImage convertToQImage(qint32 x1, qint32 y1, qint32 width, qint32 height, const KoColorProfile *profile)
const KoColorSpace * colorSpace() const
void convertImageColorSpace(const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
QRect bounds() const override
static KisPart * instance()
void removeDocument(KisDocument *document, bool deleteDocument=true)
KisDocument * createTemporaryDocument() const
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
virtual const KoColorProfile * profile() const =0
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
const KoColorSpace * colorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()
const KoColorProfile * p2020PQProfile() const