bryal / dxgcap-rs

Screen capturing with DXGI for Windows in Rust
GNU Affero General Public License v3.0
49 stars 15 forks source link

Get the data as slice from the captured image #3

Closed daniel-abramov closed 3 years ago

daniel-abramov commented 7 years ago

At the moment capture_frame() returns Vec<BGRA>, however most applications which do the further processing of the capture frame (i.e. encode it etc) require &[u8] or something similar, in other words, it would be nice to have a direct access to the pixel buffer data.

One of the possible solutions is to use image::ImageBuffer type from Piston Developers' image crate.

bryal commented 7 years ago

This sounds like a great idea! Unfortunately, I don't really do Windows development anymore. In fact, I don't even have access to a Windows environment to develop this change in :( .

If you, or anybody else, would like to write a pull request yourself, however, I would gladly help you out as much as I can.

bryal commented 3 years ago

Closed by #7