summaryrefslogtreecommitdiffstats
path: root/DOCS/man/input.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-20 19:32:52 +0200
committerwm4 <wm4@nowhere>2019-10-20 19:41:18 +0200
commita495bfe373b696c13df85ade772d33611533de8a (patch)
tree1128e0b34dc93179b3b493736a9222de29efdcfe /DOCS/man/input.rst
parentff67fbf328b32202f9fea8223f73c6dbcb44eca2 (diff)
downloadmpv-a495bfe373b696c13df85ade772d33611533de8a.tar.bz2
mpv-a495bfe373b696c13df85ade772d33611533de8a.tar.xz
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.
Diffstat (limited to 'DOCS/man/input.rst')
-rw-r--r--DOCS/man/input.rst6
1 files changed, 6 insertions, 0 deletions
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``.