Commit af4656eb authored by Boudewijn Rempt's avatar Boudewijn Rempt

Try to make the PNG test run on Jenkins

We don't have the HDR profiles on Jenkins, so we need to check
which ones are available.
parent 5830646d
......@@ -45,8 +45,6 @@ void KisPngTest::testWriteonly()
void roudTripHdrImage(const KoColorSpace *savingColorSpace)
{
qDebug() << "Test saving" << savingColorSpace->id() << savingColorSpace->profile()->name();
const KoColorSpace * scRGBF32 =
KoColorSpaceRegistry::instance()->colorSpace(
RGBAColorModelID.id(),
......@@ -130,18 +128,37 @@ void KisPngTest::testSaveHDR()
colorDepthIds << Float32BitsColorDepthID;
QVector<const KoColorProfile*> profiles;
profiles << KoColorSpaceRegistry::instance()->p709G10Profile();
profiles << KoColorSpaceRegistry::instance()->p2020G10Profile();
profiles << KoColorSpaceRegistry::instance()->p2020PQProfile();
const KoColorProfile *profile = KoColorSpaceRegistry::instance()->p709G10Profile();
if (!profile) {
qWarning() << "Could not get a p709G10 Profile";
}
else {
profiles << profile;
}
profile = KoColorSpaceRegistry::instance()->p2020G10Profile();
if (!profile) {
qWarning() << "Could not get a p2020G10 Profile";
}
else {
profiles << profile;
}
profile = KoColorSpaceRegistry::instance()->p2020PQProfile();;
if (!profile) {
qWarning() << "Could not get a p2020PQ Profile";
}
else {
profiles << profile;
}
Q_FOREACH(const KoID &depth, colorDepthIds) {
Q_FOREACH(const KoColorProfile *profile, profiles) {
roudTripHdrImage(
KoColorSpaceRegistry::instance()->colorSpace(
RGBAColorModelID.id(),
depth.id(),
profile));
if (profile) {
roudTripHdrImage(
KoColorSpaceRegistry::instance()->colorSpace(
RGBAColorModelID.id(),
depth.id(),
profile));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment