smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
616 stars 156 forks source link

[Help] How to avoid some overlaying controls be captured? #154

Closed jcyuan closed 1 year ago

jcyuan commented 1 year ago

i need to have a color indicator control to be followed with my mouse, but i don't want it gets captured, how to avoid this? for example specify an ignorable window list in the config, so that i can put the indicator control in an ignored window? thanks.

btw, i use OnNewFrame to initialize my bitmap stream, use OnFrameUpdated to update the bitmap with the reported segment. i think this is ok? but i found the captured screen is static and not animated at all. why?

i think i figured it out, because my fullscreen image gets captured in the new frame.... so it's always static. ok so basically 1 question only...

smasherprog commented 1 year ago

You can use the Onframeupdated only. The first Frame will be the ENTIRE image since its new.

Can you restate the second question, im not clear on what you need.

jcyuan commented 1 year ago

You can use the Onframeupdated only. The first Frame will be the ENTIRE image since its new.

Can you restate the second question, im not clear on what you need.

thank you for you reply. my questions were:

1, what i'm doing is creating a color picker, so i need to make a magnifier moving aside the mouse alwasy, so i need to put this stuff in my "fullscreen" window which contains the captured bitmap. but this window will be captured again and again, so i thought the OnFrameUpdated didn't report changed image parts correctly before, my bad.

2, because of my requirement, so i'm thinking is it possible that my window can be ignored to be captured. to achieve this actually i can make my window fully transparent, but at the same time obviously my magnifier will be transparent too. so i don't know how to achieve this. but anyway if this can't be done with some ways out there, i will just use the first captured frame to do the color picking (static screen).

You can use the Onframeupdated only. The first Frame will be the ENTIRE image since its new.

about this, yes i found it, very handy! thank you.

smasherprog commented 1 year ago

yeah i think id use the same process that windows snippit program uses and freeze the current frame and let users pick from that. So use the last current full fame and display that to pick from.