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

fix: always seek to the beginning of the ioproxy during open for DDS and PSD files #4048

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/dds.imageio/ddsinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ DDSInput::open(const std::string& name, ImageSpec& newspec)

if (!ioproxy_use_or_open(name))
return false;
ioseek(0);

static_assert(sizeof(dds_header) == 128, "dds header size does not match");
if (!ioread(&m_dds, sizeof(m_dds), 1))
Expand Down
1 change: 1 addition & 0 deletions src/psd.imageio/psdinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ PSDInput::open(const std::string& name, ImageSpec& newspec)
m_filename = name;
if (!ioproxy_use_or_open(name))
return false;
ioseek(0);

// File Header
if (!load_header()) {
Expand Down
Loading