54 {
58 {
60 reader.setDecideFormatFromContent(true);
61 image = reader.read();
62
64 reader.setAutoDetectImageFormat(true);
65 image = reader.read();
66 }
67
68 }
69
72 }
73
79
82 }
85 } else {
87 }
88 }
90 }
91
92
93
94
95#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
96 if (
image.colorSpace().colorModel() != QColorSpace::ColorModel::Rgb || !
image.colorSpace().isValid()) {
97 image.convertToColorSpace(QColorSpace(QColorSpace::SRgb));
98 }
99#else
100 image.convertToColorSpace(QColorSpace(QColorSpace::SRgb));
101#endif
102
103 return (!
image.isNull());
104 }
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