Giter VIP home page Giter VIP logo

Comments (4)

mallman avatar mallman commented on August 24, 2024 1

Thank you. This has helped very much.

from rawspeed.

LebedevRI avatar LebedevRI commented on August 24, 2024

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.

from rawspeed.

mallman avatar mallman commented on August 24, 2024

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.

from rawspeed.

LebedevRI avatar LebedevRI commented on August 24, 2024

See e.g. https://github.com/darktable-org/darktable/blob/6cfcb0b5344a75d2b51e683abbe0c5bd8ffcbda2/src/imageio/imageio_rawspeed.cc#L395-L405
Just taking address of the first column gives that address.

from rawspeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.