Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-link committed Apr 23, 2024
2 parents 28d6d25 + 93588b7 commit 69cbff0
Show file tree
Hide file tree
Showing 33 changed files with 925 additions and 512 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
else()
# GNU compiler options
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wextra -O3 -pthread -DLOG_LEVEL=3 -Wno-free-nonheap-object"
"${CMAKE_CXX_FLAGS} -Wall -Wextra -O3 -pthread -DLOG_LEVEL=3 -Wno-free-nonheap-object -g"
)
endif()

Expand Down
1 change: 1 addition & 0 deletions HighMap/include/highmap/colormaps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
*/
#pragma once
#include <vector>

namespace hmap
{
Expand Down
6 changes: 6 additions & 0 deletions HighMap/include/highmap/heightmap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ struct HeightMapRGBA
*/
void set_sto(Vec2<int> new_shape, Vec2<int> new_tiling, float new_overlap);

/**
* @brief Export the RGB heightmap to a 8bit png file.
* @param fname File name.
*/
void to_png_8bit(std::string fname);

/**
* @brief Export the RGB heightmap to a 16bit png file.
* @param fname File name.
Expand Down
11 changes: 11 additions & 0 deletions HighMap/include/highmap/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,17 @@ void write_png_rgb_16bit(std::string fname,
std::vector<uint16_t> &img,
Vec2<int> shape);

/**
* @brief Export an 8bit RGBA image to a png file.
*
* @param fname File name.
* @param img Image data.
* @param shape Image shape.
*/
void write_png_rgba_8bit(std::string fname,
std::vector<uint8_t> &img,
Vec2<int> shape);

/**
* @brief Export an 16bit RGBA image to a png file.
*
Expand Down
Loading

0 comments on commit 69cbff0

Please sign in to comment.