Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Read EXR files from memory #1733

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

gapry
Copy link

@gapry gapry commented Nov 26, 2024

Related Issue

This work addresses the Issue: #1187

Description

This PR continues the work initiated by Nabiel Kandiel in PR #1448.


std::string actual_filename = std::string(argv[1]) + "data/Rec709.exr";
std::string filename = "readFromMem.exr";
reader->SetFileName(filename.c_str());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the filename should be set here.

{
if (pos + n <= bufflen)
{
memcpy(c, buffer + pos, n);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use C++ here (you may need to include algorithm instead of cstring)

Suggested change
memcpy(c, buffer + pos, n);
std::copy_n(buffer + pos, n, c);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 226b4c8

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.69%. Comparing base (11dd455) to head (226b4c8).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
vtkext/private/module/vtkF3DEXRReader.cxx 92.30% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1733      +/-   ##
==========================================
- Coverage   96.96%   95.69%   -1.27%     
==========================================
  Files         110      118       +8     
  Lines        8825     9368     +543     
==========================================
+ Hits         8557     8965     +408     
- Misses        268      403     +135     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants