# What is pitch and stride?

**URL:** <https://community.khronos.org/t/what-is-pitch-and-stride/4758>\
**Category:** OpenGL\
**Tags:** opengles\
**Created:** [June 6, 2014, 12:39pm UTC](https://community.khronos.org/t/what-is-pitch-and-stride/4758 "2014-06-06T12:39:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jpilon](https://community.khronos.org/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@jpilon](https://community.khronos.org/u/jpilon)\
**Post date:** [July 24, 2014, 3:57pm UTC](https://community.khronos.org/t/what-is-pitch-and-stride/4758/2 "2014-07-24T15:57:12Z")

</div>

Stride is clear and commonly used. It means bytes in a row of pixels including any padding. So an image could be 510 pixels in width and rounded up to 512 pixels. The stride would be 512 \* bit depth of the image’s format. You could also have stride in pixels. in which case the stride would be 512 pixels.

Pitch is a little more vague, but typically could be interchangeable with stride. Considering your reference is specifying in bytes, it’s likely safe to assume they’re not measuring in pixels. So the reference likely means the number of bytes in a row + padding, the only alternative would be number of bytes without padding e.g. image width \* bit depth.

---

_[View the full topic](https://community.khronos.org/t/what-is-pitch-and-stride/4758)._
