~ubuntu-branches/ubuntu/oneiric/koffice/oneiric-updates

« back to all changes in this revision

Viewing changes to krita/sdk/tests/filestest.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
            QString id = doc.image()->colorSpace()->id();
78
78
            if (id != "GRAYA" && id != "GRAYA16" && id != "RGBA" && id != "RGBA16") {
79
79
                dbgKrita << "Images need conversion";
80
 
                doc.image()->convertTo(KoColorSpaceRegistry::instance()->rgb8());
 
80
                doc.image()->convertImageColorSpace(KoColorSpaceRegistry::instance()->rgb8());
81
81
            }
82
82
 
83
83
            KTemporaryFile tmpFile;
84
84
            tmpFile.setSuffix(".png");
85
85
            tmpFile.open();
86
 
            tmpFile.setAutoRemove(false);
 
86
            doc.setBackupFile(false);
87
87
            doc.setOutputMimeType("image/png");
88
88
            doc.saveAs("file://" + tmpFile.fileName());
 
89
 
89
90
            QImage resultImage(resultFileInfo.absoluteFilePath());
90
91
            resultImage = resultImage.convertToFormat(QImage::Format_ARGB32);
91
92
            QImage sourceImage(tmpFile.fileName());
92
93
            sourceImage = sourceImage.convertToFormat(QImage::Format_ARGB32);
93
94
 
 
95
            tmpFile.close();
 
96
 
94
97
            QPoint pt;
95
98
 
96
99
            if (!TestUtil::compareQImages(pt, resultImage, sourceImage)) {
97
100
                failuresCompare << sourceFileInfo.fileName() + ": " + QString("Pixel (%1,%2) has different values").arg(pt.x()).arg(pt.y()).toLatin1();
 
101
                resultImage.save(sourceFileInfo.fileName() + ".png");
98
102
                continue;
99
103
            }
100
104
        }