From a495bfe373b696c13df85ade772d33611533de8a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 20 Oct 2019 19:32:52 +0200 Subject: manpage: describe stride parameter in screenshot-raw command This is mentioned and called "obvious", but it's conceivable users don't necessarily know about the concept. Just explain it. --- DOCS/man/input.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 0c5cf2035d..c96876563f 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -915,6 +915,12 @@ Input Commands that are Possibly Subject to Change is freed as soon as the result mpv_node is freed. As usual with client API semantics, you are not allowed to write to the image data. + The ``stride`` is the number of bytes from a pixel at ``(x0, y0)`` to the + pixel at ``(x0, y0 + 1)``. This can be larger than ``w * 4`` if the image + was cropped, or if there is padding. This number can be negative as well. + You access a pixel with ``byte_index = y * stride + x * 4`` (assuming the + ``bgr0`` format). + The ``flags`` argument is like the first argument to ``screenshot`` and supports ``subtitles``, ``video``, ``window``. -- cgit v1.2.3