Skip to content

Commit

Permalink
Removed BMP writer and third-party header
Browse files Browse the repository at this point in the history
Maybe in future, a more robust BMP solution will be incorporated. It
turned out the BMP image was not compressed at all. It had exactly the
same size as a binary 24bit-RGB PPM image.

Re #45
  • Loading branch information
mfranke93 committed Sep 25, 2017
1 parent ac52d84 commit d8e3154
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 4,422 deletions.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ link_directories(${VISUALIZER_BINARY_DIR}/src)

add_executable(main main.cpp
io/filereader.cpp
io/bmp_writer.cpp
io/png_writer.cpp
io/ppm_writer.cpp
data/grid.cpp
Expand Down
5 changes: 0 additions & 5 deletions src/cmdline/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <string>
#include "../data/normalizer.hpp"
#include "../vis/standard_colormap.hpp"
#include "../io/bmp_writer.hpp"
#include "../io/ppm_writer.hpp"
#include "../io/png_writer.hpp"

Expand Down Expand Up @@ -45,10 +44,6 @@ namespace config
* Map "factory" for image outputs.
*/
std::map<std::string, std::function<std::shared_ptr<io::FileWriter>(std::shared_ptr<vis::Image>)>> const filewriters = {
{ "bmp" , [](std::shared_ptr<vis::Image> img) -> std::shared_ptr<io::FileWriter>
{
return std::make_shared<io::BmpWriter>(img);
}},
{ "ppm" , [](std::shared_ptr<vis::Image> img) -> std::shared_ptr<io::FileWriter>
{
return std::make_shared<io::PpmWriter>(img);
Expand Down
4 changes: 2 additions & 2 deletions src/cmdline/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmdline::CommandlineInterface::CommandlineInterface()
("help,h", "Print help messages")

("in,i", po::value<std::string>(&inputFile), "Input file")
("out,o", po::value<std::string>(&outputFile)->default_value("out.bmp"), "Output file")
("out,o", po::value<std::string>(&outputFile)->default_value("out.ppm"), "Output file")
("upscale,s", po::value<size_t>(&upscaleFactor)->default_value(1), "Size scaling of output image. May not be 0")
("cmap,c", po::value<std::string>(), "Colormap to use. Defaults to heat map."
" Options are: RdBu, heat, deepsea, gray/grey")
Expand All @@ -16,7 +16,7 @@ cmdline::CommandlineInterface::CommandlineInterface()
("ascii,a", po::bool_switch(&useAscii), "Use ASCII (7 bit charset) only")
("force-size", po::bool_switch(&forceSizeOverride), "Force a larger size for image than normally allowed")
("file-type,T", po::value<std::string>()->default_value("ppm"), "Filetype of output. Defaults to ppm."
" Options are ppm, bmp, png.")
" Options are ppm, png.")
;
}

Expand Down
28 changes: 0 additions & 28 deletions src/io/bmp_writer.cpp

This file was deleted.

35 changes: 0 additions & 35 deletions src/io/bmp_writer.hpp

This file was deleted.

2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "io/bmp_writer.hpp"
#include "io/ppm_writer.hpp"
#include "io/filereader.hpp"
#include "data/standard_single_byte_transition_counter.hpp"
#include <stdio.h>
Expand Down
Loading

0 comments on commit d8e3154

Please sign in to comment.