..
  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:: PackedImageDesc
   :module: PyOpenColorIO

   All the constructors expect a pointer to packed image data (such as rgbrgbrgb or rgbargbargba) starting at the first color channel of the first pixel to process (which does not need to be the first pixel of the image). The number of channels must be greater than or equal to 3. If a 4th channel is specified, it is assumed to be alpha information. Channels > 4 will be ignored.

   .. note::
      The methods assume the :ref:`CPUProcessor` bit-depth type for the data pointer.


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

      Overloaded function.

      1. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, numChannels: int) -> None

      .. note::
         numChannels must be 3 (RGB) or 4 (RGBA).

      2. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, numChannels: int, bitDepth: PyOpenColorIO.BitDepth, chanStrideBytes: int, xStrideBytes: int, yStrideBytes: int) -> None

      .. note::
         numChannels must be 3 (RGB) or 4 (RGBA).

      3. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, chanOrder: PyOpenColorIO.ChannelOrdering) -> None

      4. __init__(self: PyOpenColorIO.PackedImageDesc, data: buffer, width: int, height: int, chanOrder: PyOpenColorIO.ChannelOrdering, bitDepth: PyOpenColorIO.BitDepth, chanStrideBytes: int, xStrideBytes: int, yStrideBytes: int) -> None


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

      Get the bit-depth.


   .. py:method:: PackedImageDesc.getChanStrideBytes(self: PyOpenColorIO.PackedImageDesc) -> int
      :module: PyOpenColorIO


   .. py:method:: PackedImageDesc.getChannelOrder(self: PyOpenColorIO.PackedImageDesc) -> PyOpenColorIO.ChannelOrdering
      :module: PyOpenColorIO

      Get the channel ordering of all the pixels.


   .. py:method:: PackedImageDesc.getData(self: PyOpenColorIO.PackedImageDesc) -> numpy.ndarray
      :module: PyOpenColorIO

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


   .. py:method:: PackedImageDesc.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:: PackedImageDesc.getNumChannels(self: PyOpenColorIO.PackedImageDesc) -> int
      :module: PyOpenColorIO


   .. py:method:: PackedImageDesc.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:: PackedImageDesc.getXStrideBytes(self: PyOpenColorIO.ImageDesc) -> int
      :module: PyOpenColorIO

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


   .. py:method:: PackedImageDesc.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:: PackedImageDesc.isFloat(self: PyOpenColorIO.ImageDesc) -> bool
      :module: PyOpenColorIO

      Is the image buffer 32-bit float?


   .. py:method:: PackedImageDesc.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`.)

