From 0893bfa04883fb9b5756d0e1740c92e87d00f4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Wed, 24 May 2023 16:27:28 +0200 Subject: [PATCH] Add method to for ICC profile --- CMakeLists.txt | 2 +- libxisf.cpp | 10 ++++++++++ libxisf.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be70469..0e37c44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.14) -project(libXISF VERSION 0.2.4 LANGUAGES CXX C +project(libXISF VERSION 0.2.5 LANGUAGES CXX C HOMEPAGE_URL https://gitea.nouspiro.space/nou/libXISF DESCRIPTION "LibXISF is C++ library that can read and write XISF files produced by PixInsight.") diff --git a/libxisf.cpp b/libxisf.cpp index c25293f..2293a20 100644 --- a/libxisf.cpp +++ b/libxisf.cpp @@ -358,6 +358,16 @@ bool Image::addFITSKeywordAsProperty(const String &name, const String &value) return false; } +const ByteArray &Image::iccProfile() const +{ + return _iccProfile; +} + +void Image::setIccProfile(const ByteArray &iccProfile) +{ + _iccProfile = iccProfile; +} + void *Image::imageData() { return _dataBlock.data.size() ? _dataBlock.data.data() : nullptr; diff --git a/libxisf.h b/libxisf.h index 86d7223..89c5e14 100644 --- a/libxisf.h +++ b/libxisf.h @@ -301,6 +301,8 @@ public: * For example OBSERVER => Observer:Name, SITELAT => Observation:Location:Latitude */ bool addFITSKeywordAsProperty(const String &name, const String &value); + const ByteArray& iccProfile() const; + void setIccProfile(const ByteArray &iccProfile); void* imageData(); const void* imageData() const;