Skip to content

Instantly share code, notes, and snippets.

@gomons gomons/image_stride.cpp
Last active Jun 15, 2016

Embed
What would you like to do?
Image stride calculation with padding of 4 byte
inline size_t image_stride_4(size_t width, size_t channels_count) {
return ( (width*channels_count * 8 + 31) & ~31) >> 3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.