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 18 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);

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