-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyBitmap FromBGR24Array #19
Comments
Hi @tgd-git I certainly can provide a way to construct a There are some performance optimizations already implemented, especially if the constructed KeyBitmap is reused the encoding (for example to jpeg) only happens once. But for stuff like videos (you can check out the video example) the images have to be encoded to jpg for each frame and even that part of the code is faster than the max. frame-rate for most such macro devices. So if I's implement that I'd probably just end up copying the buffer internally anyways because it's probably not worth the effort to rewrite everything internally to be a hand full of nanoseconds faster just to end up JPEG encoding the image later. |
Thank you for the explanation, i see i was bit off in my thinking how the data is handled :) I am very surprised about the JPEG encoding. I see your point that this is the most costly part. You might still want to add a method for 4 channel input just for user convenience in some cases. |
In the new version (5.0.0 via nuget) there are two new methods Details see source: https://github.com/OpenMacroBoard/OpenMacroBoard.SDK/blob/master/src/OpenMacroBoard.SDK/KeyBitmapBasicFactoryExtensions.cs |
👌 |
thats the editor view for a visual programming language called vvvv, made in berlin. https://visualprogramming.net/ |
I am tinkering with setting GPU rendered graphics on a key. The GPU textures are always float4 (always with alpha channel, regardless of the fact if it is used or not). Now when reading these textures back from GPU to byte arrays it is at minimal cost (just a copy of the vram) but i am stuck with 4 channels. now stripping the 4th channel from that array requires a costly loop over the whole array. i would like to avoid that step.
I wish there would be at least BGRA32 or a more common RGBA32 option beside the BGR24 format. I understand that there is no point to care about the alpha channel on a key and omitting alpha reduces the amount of data to be sent. I wonder if one could still provide 4 channel images and the lib could just skip the 4th channel when sending the data to the device? sorry if i get anything wrong about how that works, i just wonder if the lib could be more convenient in case the source data is not BGR24.
The text was updated successfully, but these errors were encountered: