Closed EMCP closed 2 years ago
Are you sure its not in some code to display the image? For example, Did you try the example and save the file to disk using the tje_encode_to_file ? Is the color not correct in this case as well?
I am quite noob to C++, so much so I didn't really dare modify the example otherwise.. especially in the encoder function..
I just took it as-is to start, and saw the solution now from the fix above.... if you want me a do a PR or something to that effect.. so you can test it just lmk.. I didn't want to do that at first and add weird switch or if statements just for OSX though
Can you try using the example code and uncommenting the save to file code path. Then open the images up and see if the colors are correct or incorrect? this line here https://github.com/smasherprog/screen_capture_lite/blob/3badb36ec9a7246033898a7de453321e67fb3c3f/Example_CPP/Screen_Capture_Example.cpp#L184
here's what I uncommented
Attached are the Dock, VS Code.. both of which show reversed Blues and Reds I believe
This code was taken straight from master this time, whereas in previous builds I was using a latest tagged version .. just fyi. all exhibit same behavior
Hmm yeah ill revisit and check that out. In the mean time, the format is here https://github.com/smasherprog/screen_capture_lite/blob/3badb36ec9a7246033898a7de453321e67fb3c3f/src_cpp/ios/NSFrameProcessor.mm#L20
If anyone reads this and uses a mac, can you comment if you are experiencing this or post if colors work as expected.
If it matters this is seen on a 2018 Mac Mini (Intel), with latest Monterey OS
So, thanks for posting on this. I finally dusted off my mac mini and was able to see that this is happening. I also am adding some permission checking code, and will fix this on mac!
It appears this was a bug across all platforms, so i updated the example. Thanks for finding this
Check out the new code. Should be fixed now in master
Glad to help where I can, thanks 👍
I've been working with the coding example (really helps and well done!). the one issue was, on Mac OS the colors were flipped..
I fixed it by negating the logic at this line from https://github.com/smasherprog/screen_capture_lite/blob/master/Example_CPP/Screen_Capture_Example.cpp#L27
to
I am unsure why it is but... the colors are now perfect.. just wanted to share