Skip to content

Commit

Permalink
test: Add tiled TIFF test case to simple_all_formats
Browse files Browse the repository at this point in the history
This is to hit more lines and make codecov happier,
than during recent build of PR #685
  • Loading branch information
mloskot committed Jun 25, 2022
1 parent 0f43590 commit 526c898
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/extension/io/simple_all_formats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ void test_tiff()
gil::write_view(tiff_out + "simple_all_format.tif", gil::view(img), gil::tiff_tag());
}

void test_tiff_tiled()
{
gil::rgba8_image_t img;
gil::read_image(tiff_filename, img, gil::tiff_tag());

fs::create_directories(fs::path(tiff_out));
gil::image_write_info<gil::tiff_tag> info;
info._is_tiled = true;
info._tile_width = info._tile_length = 64; // must be multiples of 16
gil::write_view(tiff_out + "simple_all_format.tif", gil::view(img), info);
}

int main(int argc, char* argv[])
{
try
Expand All @@ -85,6 +97,7 @@ int main(int argc, char* argv[])
// TODO: test_raw()
test_targa();
test_tiff();
test_tiff_tiled();
}
catch (std::exception const& e)
{
Expand Down

0 comments on commit 526c898

Please sign in to comment.