mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-07 09:45:25 +08:00
6.5.3 clean
This commit is contained in:
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/24bpp.ico
Normal file
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/24bpp.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/24bpp.png
Normal file
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/24bpp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/32bpp.ico
Normal file
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/32bpp.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/32bpp.png
Normal file
BIN
tests/auto/gui/image/qicoimageformat/icons/masked/32bpp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
@ -27,6 +27,8 @@ private slots:
|
||||
void pngCompression();
|
||||
void write_data();
|
||||
void write();
|
||||
void icoMask_data();
|
||||
void icoMask();
|
||||
|
||||
private:
|
||||
QString m_IconPath;
|
||||
@ -319,6 +321,33 @@ void tst_QIcoImageFormat::write()
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QIcoImageFormat::icoMask_data()
|
||||
{
|
||||
QTest::addColumn<QString>("inFile");
|
||||
QTest::addColumn<QString>("outFile");
|
||||
|
||||
QTest::newRow("24bpp") << "masked/24bpp.ico" << "masked/24bpp.png";
|
||||
QTest::newRow("32bpp") << "masked/32bpp.ico" << "masked/32bpp.png";
|
||||
}
|
||||
|
||||
void tst_QIcoImageFormat::icoMask()
|
||||
{
|
||||
QFETCH(QString, inFile);
|
||||
QFETCH(QString, outFile);
|
||||
|
||||
QImage inImage;
|
||||
QImageReader inReader(m_IconPath + QLatin1Char('/') + inFile);
|
||||
inReader.read(&inImage);
|
||||
|
||||
QImage outImage;
|
||||
QImageReader outReader(m_IconPath + QLatin1Char('/') + outFile);
|
||||
outReader.read(&outImage);
|
||||
outImage.setColorSpace(inImage.colorSpace());
|
||||
outImage = outImage.convertToFormat(inImage.format());
|
||||
|
||||
QCOMPARE(inImage, outImage);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QIcoImageFormat)
|
||||
#include "tst_qicoimageformat.moc"
|
||||
|
||||
|
Reference in New Issue
Block a user