Skip to content

Docs: correct the type for BMP x/y density #4695

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

Merged

Conversation

ideasman42
Copy link
Contributor

These values are read & written as integers
and don't work unless they are accessed using int accessors.

m_dib_header.hres = m_spec.get_int_attribute("XResolution");

Description

Correct documentation.

BMP uses integer access:

  • ./src/bmp.imageio/bmpinput.cpp:, m_spec.attribute("XResolution", (int)m_dib_header.hres);
  • ./src/bmp.imageio/bmpoutput.cpp, m_dib_header.hres = m_spec.get_int_attribute("XResolution");

These values are read & written as integers
and don't work unless they are accessed using int accessors.

Signed-off-by: Campbell Barton <[email protected]>
@ideasman42 ideasman42 force-pushed the pr-bmp-density-correction branch from 5469034 to b611767 Compare April 8, 2025 02:05
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

Thanks for the correction!

@lgritz lgritz merged commit 07a5079 into AcademySoftwareFoundation:main Apr 8, 2025
3 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Apr 12, 2025
…#4695)

These values are read & written as integers
and don't work unless they are accessed using int accessors.

m_dib_header.hres = m_spec.get_int_attribute("XResolution");

Correct documentation.

BMP uses integer access:
- `./src/bmp.imageio/bmpinput.cpp:`, `m_spec.attribute("XResolution",
(int)m_dib_header.hres);`
- `./src/bmp.imageio/bmpoutput.cpp`, `m_dib_header.hres =
m_spec.get_int_attribute("XResolution");`

Signed-off-by: Campbell Barton <[email protected]>
scott-wilson pushed a commit to scott-wilson/OpenImageIO that referenced this pull request May 17, 2025
…#4695)

These values are read & written as integers
and don't work unless they are accessed using int accessors.

m_dib_header.hres = m_spec.get_int_attribute("XResolution");

Correct documentation.

BMP uses integer access:
- `./src/bmp.imageio/bmpinput.cpp:`, `m_spec.attribute("XResolution",
(int)m_dib_header.hres);`
- `./src/bmp.imageio/bmpoutput.cpp`, `m_dib_header.hres =
m_spec.get_int_attribute("XResolution");`

Signed-off-by: Campbell Barton <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
scott-wilson pushed a commit to scott-wilson/OpenImageIO that referenced this pull request May 18, 2025
…#4695)

These values are read & written as integers
and don't work unless they are accessed using int accessors.

m_dib_header.hres = m_spec.get_int_attribute("XResolution");

Correct documentation.

BMP uses integer access:
- `./src/bmp.imageio/bmpinput.cpp:`, `m_spec.attribute("XResolution",
(int)m_dib_header.hres);`
- `./src/bmp.imageio/bmpoutput.cpp`, `m_dib_header.hres =
m_spec.get_int_attribute("XResolution");`

Signed-off-by: Campbell Barton <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
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.

2 participants