Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| faf4a2f4d5 | |||
| 29a467b694 | |||
| 2107d68e71 | |||
| 2e8bbf6e30 | |||
| a0968bba3a |
+7
-1
@@ -12,7 +12,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
add_library(XISF SHARED
|
||||
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
||||
|
||||
add_library(XISF
|
||||
libXISF_global.h
|
||||
libxisf.cpp
|
||||
libxisf.h
|
||||
@@ -26,7 +28,11 @@ set_target_properties(XISF PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PRO
|
||||
|
||||
target_link_libraries(XISF PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(XISF PRIVATE LIBXISF_LIBRARY)
|
||||
else(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(XISF PUBLIC LIBXISF_STATIC_LIB)
|
||||
endif(BUILD_SHARED_LIBS)
|
||||
|
||||
set(XISF_PUBLIC_HEADERS libxisf.h libXISF_global.h)
|
||||
|
||||
|
||||
Vendored
+7
-1
@@ -1,4 +1,10 @@
|
||||
libxisf (0.1.2-ubuntu1) UNRELEASED; urgency=medium
|
||||
libxisf (0.1.3-ubuntu1) focal; urgency=medium
|
||||
|
||||
* Write missing pixelStorage attribute
|
||||
|
||||
-- Dušan Poizl <nou@nouspiro.space> Fri, 17 Feb 2023 16:57:30 +0100
|
||||
|
||||
libxisf (0.1.2-ubuntu1) focal; urgency=medium
|
||||
|
||||
* Add qtbase5-dev as dependency to libxisf-dev
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ Package: libxisf-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: libxisf qtbase5-dev (= ${binary:Version}), ${misc:Depends}
|
||||
Depends: libxisf (= ${binary:Version}), ${misc:Depends}, qtbase5-dev
|
||||
Description: Library to load and save XISF images
|
||||
Native format of PixInsight astroprocessing suite
|
||||
|
||||
|
||||
@@ -21,10 +21,14 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifdef LIBXISF_STATIC_LIB
|
||||
# define LIBXISF_EXPORT
|
||||
#else
|
||||
# if defined(LIBXISF_LIBRARY)
|
||||
# define LIBXISF_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define LIBXISF_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // LIBXISF_GLOBAL_H
|
||||
|
||||
+13
@@ -952,6 +952,7 @@ void XISFWriter::writeImageElement(const Image &image)
|
||||
_xml->writeAttribute("sampleFormat", Image::sampleFormatString(image._sampleFormat));
|
||||
_xml->writeAttribute("colorSpace", Image::colorSpaceString(image._colorSpace));
|
||||
_xml->writeAttribute("imageType", Image::imageTypeString(image._imageType));
|
||||
_xml->writeAttribute("pixelStorage", Image::pixelStorageString(image._pixelStorage));
|
||||
if((image._sampleFormat == Image::Float32 || image._sampleFormat == Image::Float64) ||
|
||||
image._bounds.first != 0.0 || image._bounds.second != 1.0)
|
||||
{
|
||||
@@ -966,6 +967,7 @@ void XISFWriter::writeImageElement(const Image &image)
|
||||
writeFITSKeyword(fitsKeyword);
|
||||
|
||||
writeCFA(image);
|
||||
writeICC(image._iccProfile);
|
||||
|
||||
_xml->writeEndElement();
|
||||
}
|
||||
@@ -1083,6 +1085,17 @@ void XISFWriter::writeCFA(const Image &image)
|
||||
}
|
||||
}
|
||||
|
||||
void XISFWriter::writeICC(const QByteArray &icc)
|
||||
{
|
||||
if(!icc.isEmpty())
|
||||
{
|
||||
QByteArray base64 = icc.toBase64();
|
||||
_xml->writeStartElement("ICCProfile");
|
||||
_xml->writeAttribute("location", "inline:base64");
|
||||
_xml->writeCharacters(base64);
|
||||
}
|
||||
}
|
||||
|
||||
#define REGISTER_METATYPE(type) { int id = qMetaTypeId<type>(); \
|
||||
typeToId.insert({#type, id}); idToType.insert({id, #type}); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user