Skip to content

Commit

Permalink
exr
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk committed Jun 29, 2023
1 parent b4b6d82 commit 34d390c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions library/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ set_target_properties(libf3dSDKTests PROPERTIES
CXX_VISIBILITY_PRESET hidden
)

target_compile_definitions(libf3dSDKTests PRIVATE F3D_MODULE_EXR=$<BOOL:F3D_MODULE_EXR>)

# List tests that do not require rendering
list(APPEND libf3dSDKTestsNoRender_list
TestSDKEngineExceptions
Expand Down
13 changes: 12 additions & 1 deletion library/testing/TestSDKImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,21 @@ int TestSDKImage(int argc, char* argv[])

if (hdrImg.getChannelType() != f3d::image::ChannelType::FLOAT)
{
std::cerr << "Cannot read a 32-bits image" << std::endl;
std::cerr << "Cannot read a HDR 32-bits image" << std::endl;
return EXIT_FAILURE;
}

#if F3D_MODULE_EXR
// check reading EXR
f3d::image exrImg(std::string(argv[1]) + "/data/kloofendal_43d_clear_1k.exr");

if (exrImg.getChannelType() != f3d::image::ChannelType::FLOAT)
{
std::cerr << "Cannot read a EXR 32-bits image" << std::endl;
return EXIT_FAILURE;
}
#endif

// check generated image with baseline
f3d::image baseline(std::string(argv[1]) + "/baselines/TestSDKImage.png");

Expand Down

0 comments on commit 34d390c

Please sign in to comment.