Skip to content

Commit

Permalink
fix FITS writing
Browse files Browse the repository at this point in the history
fix output formats list
  • Loading branch information
astrowander committed Dec 4, 2023
1 parent 153422f commit 322a798
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Codecs/imageencoder.cpp
Expand Up @@ -5,6 +5,7 @@
#include "PPM/ppmencoder.h"
#include "Tiff/TiffEncoder.h"
#include "JPEG/JpegEncoder.h"
#include "FITS/FitsEncoder.h"

ACMB_NAMESPACE_BEGIN

Expand Down Expand Up @@ -52,6 +53,10 @@ std::shared_ptr<ImageEncoder> ImageEncoder::Create(const std::string &fileName)
{
pEncoder.reset( new JpegEncoder() );
}
else if ( FitsEncoder::GetExtensions().contains( extension ) )
{
pEncoder.reset( new FitsEncoder() );
}

if (!pEncoder)
throw std::invalid_argument("fileName");
Expand Down
2 changes: 1 addition & 1 deletion Core/versioning.h
Expand Up @@ -2,5 +2,5 @@
#define MAJOR_VERSION "1"
#define MINOR_VERSION "0"
#define REVISION_VERSION "1"
#define BUILD_NUMBER "0"
#define BUILD_NUMBER "1"
#define FULL_VERSION MAJOR_VERSION "." MINOR_VERSION "." REVISION_VERSION "." BUILD_NUMBER
4 changes: 2 additions & 2 deletions GUI/ImageWriterWindow.cpp
Expand Up @@ -60,7 +60,7 @@ void ImageWriterWindow::DrawPipelineElementControls()
fileDialog.OpenDialog( "SelectOutputFile", "Select Directory", nullptr, _workingDirectory.c_str(), 0 );
}, "Choose a directory to export the results" );

UI::Combo( "Format", &_formatId, _formatList.c_str(), "Choose a file format to export the results");
UI::Combo( "Format", &_formatId, _formatList, "Choose a file format to export the results");
}
else
{
Expand Down Expand Up @@ -171,4 +171,4 @@ std::vector<std::string> ImageWriterWindow::RunAllTasks()

REGISTER_TOOLS_ITEM( ImageWriterWindow )

ACMB_GUI_NAMESPACE_END
ACMB_GUI_NAMESPACE_END

0 comments on commit 322a798

Please sign in to comment.