You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all,, thank you very much for a great work.
Is it possible to add ability to make screenshots into raw buffer rather than Result<ImageRgba> ?
it's very useful for work with opencv, but right now your lib does conversion from bgr into rgba and then to work properly with images in opencv code have to do backward conversion from rgba into bgr.
Just a side note. Result might be something like
pubstructRawImage{pubwidth:u32,pubheight:u32,pubdata:Vec<u8>,// even BGRA works very well in here. }
Then it's very easy to convert it into opencv::Mat
Also: isn't it a bit strange to save a screen capture with transparancy while the screenshot itself only contains pixels without transparancy? Getting a RGB buffer would save cpu some cycles and memory. Good for the environment ;)
@nashaofu Thank you very much !
Yep I already upgraded to new lib and tried working with RgbaImage, it has exactly same issue for me, to build RgbaImage lib have to walk through all pixels and swap R and B values (BGRA -> RGBA):
for bgra in buffer.chunks_exact_mut(4) {
bgra.swap(0, 2);
}
And to convert it correctly into opencv.Mat format I have to swap it back form RGBA into BGRA.
So every screenshot have to be processed twice.
And because I have to read screen with max FPS possible, it's very costly for my case.
But don't worry I think it's very specific problem and I can easily solve it by just using parts of code from your lib in my experiments.
I can close issue if you want.
Anyway thank you very much for your hard work and help ! Very much appreciate all you have done !
First of all,, thank you very much for a great work.
Is it possible to add ability to make screenshots into raw buffer rather than
Result<ImageRgba>
?it's very useful for work with opencv, but right now your lib does conversion from bgr into rgba and then to work properly with images in opencv code have to do backward conversion from rgba into bgr.
Just a side note. Result might be something like
Then it's very easy to convert it into opencv::Mat
The text was updated successfully, but these errors were encountered: