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

src/librawspeed/README.md is out of date #491

Open
mallman opened this issue Jun 30, 2023 · 4 comments
Open

src/librawspeed/README.md is out of date #491

mallman opened this issue Jun 30, 2023 · 4 comments

Comments

@mallman
Copy link
Contributor

mallman commented Jun 30, 2023

I recently attempted to update my version of rawspeed and found that certain APIs I used before have changed. Some I don't know how to replace. For example, I used to use the RawImageData->getData() and RawImageData->getData(int, int) apis, but those are gone. I don't know how to update my code. Would you please go through that file and update it for usage with the current API?

Thank you.

@LebedevRI
Copy link
Member

Yup, docs are not up to date.

For example, I used to use the RawImageData->getData() and RawImageData->getData(int, int) apis, but those are gone. I don't know how to update my code.

You want get{U16,F32}DataAs{Uncropped,Cropped}Array2DRef(), which returns a thin 2d view.

@mallman
Copy link
Contributor Author

mallman commented Jul 2, 2023

Yup, docs are not up to date.

For example, I used to use the RawImageData->getData() and RawImageData->getData(int, int) apis, but those are gone. I don't know how to update my code.

You want get{U16,F32}DataAs{Uncropped,Cropped}Array2DRef(), which returns a thin 2d view.

Hi @LebedevRI. Thank you for the guidance. I could use a little more help.

The API I'm integrating with requires a linear uint16_t* buffer (of the decoded raw data), similar to what RawImageData->getData() provided. Is it still possible to get the underlying uint8_t* or uint16_t* from the new API?

If not, what would you recommend as the most efficient way to alloc and populate a uint16_t* from the values returned by getU16DataAs{Uncropped,Cropped}Array2DRef()?

Thank you.

@LebedevRI
Copy link
Member

@mallman
Copy link
Contributor Author

mallman commented Jul 3, 2023

Thank you. This has helped very much.

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

No branches or pull requests

2 participants