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

raw input: fix wrong resolution when not demosaicing #3125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/raw.imageio/rawinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,13 @@ RawInput::open_raw(bool unpack, const std::string& name,
m_spec.channelnames.clear();
m_spec.channelnames.emplace_back("Y");

// Go back and use the "real" resolution in sizes.width/height,
// not the "output" resolution in sizes.iwidth/iheight.
m_spec.width = m_processor->imgdata.sizes.width;
m_spec.height = m_processor->imgdata.sizes.height;
m_spec.full_width = m_spec.width;
m_spec.full_height = m_spec.height;

// Put the details about the filter pattern into the metadata
std::string filter(
libraw_filter_to_str(m_processor->imgdata.idata.filters));
Expand Down