Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c74a67184c | |||
| 77b83e4832 | |||
| e2d3c878c4 | |||
| 3b3d472149 | |||
| 8f8cc94ddb | |||
| bf20f8eb9c | |||
| dd66850fdf | |||
| 83f12a434c | |||
| 43533aa363 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
project(libXISF VERSION 0.2.0 LANGUAGES CXX C)
|
project(libXISF VERSION 0.2.1 LANGUAGES CXX C)
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|||||||
@@ -3,4 +3,15 @@ LibXISF
|
|||||||
|
|
||||||
LibXISF is C++ library that can read and write XISF files produced by [PixInsight](https://pixinsight.com/).
|
LibXISF is C++ library that can read and write XISF files produced by [PixInsight](https://pixinsight.com/).
|
||||||
It implement [XISF 1.0 specification](https://pixinsight.com/doc/docs/XISF-1.0-spec/XISF-1.0-spec.html).
|
It implement [XISF 1.0 specification](https://pixinsight.com/doc/docs/XISF-1.0-spec/XISF-1.0-spec.html).
|
||||||
It is licensed under GPLv3. To compile you will need C++17 compiler.
|
It is licensed under GPLv3 or later. To compile you will need C++17 compiler.
|
||||||
|
|
||||||
|
To compile simply run these commands
|
||||||
|
```
|
||||||
|
cmake -B build -S .
|
||||||
|
cmake --build build --parallel
|
||||||
|
cmake --install .
|
||||||
|
```
|
||||||
|
|
||||||
|
By default it use bundled libraries. If you wish to use external libraries you will may add
|
||||||
|
`-DUSE_BUNDLED_LIBS=Off` to first command. Then you will need *lz4 pkg-config pugixml zlib* installed.
|
||||||
|
You may also specify `-DBUILD_SHARED_LIBS=Off` if you want build static lib.
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* LibXISF - library to load and save XISF files *
|
||||||
|
* Copyright (C) 2023 Dušan Poizl *
|
||||||
|
* *
|
||||||
|
* This program is free software: you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
#include "libxisf.h"
|
#include "libxisf.h"
|
||||||
|
|
||||||
namespace LibXISF
|
namespace LibXISF
|
||||||
|
|||||||
Vendored
+6
@@ -1,3 +1,9 @@
|
|||||||
|
libxisf (0.2.0-ubuntu2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Fix lintian errors
|
||||||
|
|
||||||
|
-- Dušan Poizl <nou@nouspiro.space> Sun, 19 Mar 2023 22:10:39 +0100
|
||||||
|
|
||||||
libxisf (0.2.0-ubuntu1) focal; urgency=medium
|
libxisf (0.2.0-ubuntu1) focal; urgency=medium
|
||||||
|
|
||||||
* Rewrite to remove Qt as dependency
|
* Rewrite to remove Qt as dependency
|
||||||
|
|||||||
Vendored
+45
@@ -50,3 +50,48 @@ License: BSD-2-clause
|
|||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
Files: zlib/*
|
||||||
|
Copyright: (c) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||||
|
License: Zlib
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
.
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
.
|
||||||
|
Jean-loup Gailly Mark Adler
|
||||||
|
jloup@gzip.org madler@alumni.caltech.edu
|
||||||
|
|
||||||
|
Files: pugixml/*
|
||||||
|
Copyright: (c) 2006-2022 Arseny Kapoulkine
|
||||||
|
License: MIT
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
.
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2006-2022 Arseny Kapoulkine
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
+9
-2
@@ -54,7 +54,7 @@ int main(int argc, char **argv)
|
|||||||
m(0, 2) = 2;
|
m(0, 2) = 2;
|
||||||
m(1, 0) = 10;
|
m(1, 0) = 10;
|
||||||
image.addProperty(Property("UI16Matrix", m));
|
image.addProperty(Property("UI16Matrix", m));
|
||||||
std::tm tm = {12, 22, 23, 1, 2, 2023, 0, 0, 0, 0, 0};
|
std::tm tm = {12, 22, 23, 1, 2, 2023, 0, 0, 0};
|
||||||
image.addProperty(Property("TimeObs", tm));
|
image.addProperty(Property("TimeObs", tm));
|
||||||
image.addFITSKeyword({"RA", "226.9751163116387", "Right ascension of the center of the image (deg)"});
|
image.addFITSKeyword({"RA", "226.9751163116387", "Right ascension of the center of the image (deg)"});
|
||||||
image.addFITSKeyword({"DEC", "62.02302376908295", "Declination of the center of the image (deg)"});
|
image.addFITSKeyword({"DEC", "62.02302376908295", "Declination of the center of the image (deg)"});
|
||||||
@@ -94,7 +94,14 @@ int main(int argc, char **argv)
|
|||||||
TEST(image.height() != 10, "Invalid height");
|
TEST(image.height() != 10, "Invalid height");
|
||||||
TEST(image.colorSpace() != LibXISF::Image::Gray, "Invalid color space");
|
TEST(image.colorSpace() != LibXISF::Image::Gray, "Invalid color space");
|
||||||
TEST(image.pixelStorage() != LibXISF::Image::Planar, "Invalid pixel storage");
|
TEST(image.pixelStorage() != LibXISF::Image::Planar, "Invalid pixel storage");
|
||||||
TEST(image.compression() != LibXISF::DataBlock::None, "Invalid compression codec");
|
if(std::strstr(argv[1], "lz4"))
|
||||||
|
{
|
||||||
|
TEST(image.compression() != LibXISF::DataBlock::LZ4, "Invalid compression codec");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TEST(image.compression() != LibXISF::DataBlock::None, "Invalid compression codec");
|
||||||
|
}
|
||||||
//TEST(!image.dataBlock.embedded, "Not embedded");
|
//TEST(!image.dataBlock.embedded, "Not embedded");
|
||||||
TEST(image.imageDataSize() != 80*2, "Invalid data size");
|
TEST(image.imageDataSize() != 80*2, "Invalid data size");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -21,8 +21,9 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <sstream>
|
||||||
#include "libxisf.h"
|
#include "libxisf.h"
|
||||||
#include "pugixml/pugixml.hpp"
|
#include <pugixml.hpp>
|
||||||
|
|
||||||
namespace LibXISF
|
namespace LibXISF
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user