..
  SPDX-License-Identifier: CC-BY-4.0
  Copyright Contributors to the OpenColorIO Project.
  Do not edit! This file was automatically generated by share/docs/frozendoc.py.

.. py:class:: PlanarImageDesc
   :module: PyOpenColorIO

   All the constructors expect pointers to the specified image planes (i.e. rrrr gggg bbbb) starting at the first color channel of the first pixel to process (which need not be the first pixel of the image). Pass NULL for aData if no alpha exists (r/g/bData must not be NULL).

   .. note::
      The methods assume the :ref:`CPUProcessor` bit-depth type for the R/G/B/A data pointers.


   .. py:method:: PlanarImageDesc.__init__(*args, **kwargs)
      :module: PyOpenColorIO

      Overloaded function.

      1. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, width: int, height: int) -> None

      2. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, aData: buffer, width: int, height: int) -> None

      Note that although :ref:`PlanarImageDesc` is powerful enough to also describe all :ref:`PackedImageDesc` scenarios, it is recommended to use a :ref:`PackedImageDesc` where possible since that allows for additional optimizations.

      3. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, width: int, height: int, bitDepth: PyOpenColorIO.BitDepth, xStrideBytes: int, yStrideBytes: int) -> None

      4. __init__(self: PyOpenColorIO.PlanarImageDesc, rData: buffer, gData: buffer, bData: buffer, aData: buffer, width: int, height: int, bitDepth: PyOpenColorIO.BitDepth, xStrideBytes: int, yStrideBytes: int) -> None


   .. py:method:: PlanarImageDesc.getAData(self: PyOpenColorIO.PlanarImageDesc) -> numpy.ndarray
      :module: PyOpenColorIO

      Get a pointer to the alpha channel of the first pixel or null as alpha channel is optional.


   .. py:method:: PlanarImageDesc.getBData(self: PyOpenColorIO.PlanarImageDesc) -> numpy.ndarray
      :module: PyOpenColorIO

      Get a pointer to the blue channel of the first pixel.


   .. py:method:: PlanarImageDesc.getBitDepth(self: PyOpenColorIO.ImageDesc) -> PyOpenColorIO.BitDepth
      :module: PyOpenColorIO

      Get the bit-depth.


   .. py:method:: PlanarImageDesc.getGData(self: PyOpenColorIO.PlanarImageDesc) -> numpy.ndarray
      :module: PyOpenColorIO

      Get a pointer to the green channel of the first pixel.


   .. py:method:: PlanarImageDesc.getHeight(self: PyOpenColorIO.ImageDesc) -> int
      :module: PyOpenColorIO

      Get the height to process (where y position starts at 0 and ends at height-1).


   .. py:method:: PlanarImageDesc.getRData(self: PyOpenColorIO.PlanarImageDesc) -> numpy.ndarray
      :module: PyOpenColorIO

      Get a pointer to the red channel of the first pixel.


   .. py:method:: PlanarImageDesc.getWidth(self: PyOpenColorIO.ImageDesc) -> int
      :module: PyOpenColorIO

      Get the width to process (where x position starts at 0 and ends at width-1).


   .. py:method:: PlanarImageDesc.getXStrideBytes(self: PyOpenColorIO.ImageDesc) -> int
      :module: PyOpenColorIO

      Get the step in bytes to find the same color channel of the next pixel.


   .. py:method:: PlanarImageDesc.getYStrideBytes(self: PyOpenColorIO.ImageDesc) -> int
      :module: PyOpenColorIO

      Get the step in bytes to find the same color channel of the pixel at the same position in the next line.


   .. py:method:: PlanarImageDesc.isFloat(self: PyOpenColorIO.ImageDesc) -> bool
      :module: PyOpenColorIO

      Is the image buffer 32-bit float?


   .. py:method:: PlanarImageDesc.isRGBAPacked(self: PyOpenColorIO.ImageDesc) -> bool
      :module: PyOpenColorIO

      Is the image buffer in packed mode with the 4 color channels? ("Packed" here means that XStrideBytes is 4x the bytes per channel, so it is more specific than simply any :ref:`PackedImageDesc`.)

