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
dirty fix for #3404 #4456
dirty fix for #3404 #4456
Conversation
thanks, can you add a check for the format and number of samples, something like:
also if we could have an option to send anything without planes to the simpler setFromAligned liek:
|
int channels = channelsFromPixelFormat(_pixelFormat); | ||
if(channels==0) return; | ||
|
||
if(width*channels==strides[0]){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't make much sense for I420 since it doesn't have channels. something like:
if(width==strides[0] && width/2==strides[1] && width/2==strides[2])
would be a better check
i added the stride size checks. Should the format and number checks go into ofPixels::setFromAlignedPixels or ofGstUtils::process_sample? How do I get samples.size()? Or do you mean strides.size() ? |
Ok i assume you meant |
yeah sorry i meant strides, looks great now thanks! i'll let the tests run and then merge it |
thanks! |
new setFromAlignedPixels gets taken when PixelFormat == OF_PIXELS_I420.