mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 20:04:16 -04:00
Rewrite the PIC image format handler
It now uses QDataStream to deal with endianness. It also supports several QImageIOHandler options. This comes with a more comprehensive test suite than the old code. Note that the old test suite was incorrect as the old code wrote the floats in the header out incorrectly (although no-one noticed because no software seems to care about those values). All the test PIC files in the test suite appear correct according to the specification (by inspection with Okteta). Unfortunately, there is a lack of other freely-available software that reads and writes PIC files (the main application that uses them is proprietary), and so this is the best I can do. REVIEW: 117944
This commit is contained in:
@ -56,7 +56,6 @@ endmacro()
|
||||
# result against the data read from the corresponding png file
|
||||
kimageformats_read_tests(
|
||||
pcx
|
||||
pic
|
||||
psd
|
||||
ras
|
||||
rgb
|
||||
@ -101,3 +100,16 @@ endif()
|
||||
if (OpenEXR_FOUND)
|
||||
# FIXME: OpenEXR tests
|
||||
endif()
|
||||
|
||||
|
||||
find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
||||
|
||||
if(NOT Qt5Test_FOUND)
|
||||
message(STATUS "Qt5Test not found, some autotests will not be built.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(pictest pictest.cpp)
|
||||
target_link_libraries(pictest Qt5::Gui Qt5::Test)
|
||||
ecm_mark_as_test(pictest)
|
||||
add_test(NAME kimageformats-pic COMMAND pictest)
|
||||
|
Reference in New Issue
Block a user