mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-16 03:24:17 -04:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
4be09ba419 | |||
6cbdf9cf54 | |||
7d6de20e8c | |||
b37c991e39 |
@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
|
||||
project(KImageFormats)
|
||||
|
||||
include(FeatureSummary)
|
||||
find_package(ECM 5.248.0 NO_MODULE)
|
||||
find_package(ECM 6.0.0 NO_MODULE)
|
||||
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
||||
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
@ -91,6 +91,7 @@ if (BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
include(ECMFeatureSummary)
|
||||
ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
|
@ -73,12 +73,20 @@ const uchar *ScanLineConverter::convertedScanLine(const QImage &image, qint32 y)
|
||||
cs = _defaultColorSpace;
|
||||
}
|
||||
if (tmp.depth() < 24) {
|
||||
tmp = tmp.convertToFormat(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||
tmp.convertTo(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||
}
|
||||
tmp.setColorSpace(cs);
|
||||
tmp.convertToColorSpace(_colorSpace);
|
||||
}
|
||||
_convBuffer = tmp.convertToFormat(_targetFormat);
|
||||
|
||||
/*
|
||||
* Work Around for wrong RGBA64 -> 16FPx4/32FPx4 conversion on Intel architecture.
|
||||
* Luckily convertTo() works fine with 16FPx4 images so I can use it instead convertToFormat().
|
||||
* See also: https://bugreports.qt.io/browse/QTBUG-120614
|
||||
*/
|
||||
tmp.convertTo(_targetFormat);
|
||||
_convBuffer = tmp;
|
||||
|
||||
if (_convBuffer.isNull()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user