.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.adv.GIFDecoder:

==========================================================================================================================================
|phoenix_title|  **wx.adv.GIFDecoder**
==========================================================================================================================================

An animation decoder supporting animated ``GIF`` files.           




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>GIFDecoder</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.adv.GIFDecoder_inheritance.png" alt="Inheritance diagram of GIFDecoder" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.adv.GIFDecoder.html" title="wx.adv.GIFDecoder" alt="" coords="29,160,175,189"/> <area shape="rect" id="node2" href="wx.adv.AnimationDecoder.html" title="wx.adv.AnimationDecoder" alt="" coords="5,83,199,112"/> <area shape="rect" id="node3" href="wx.ObjectRefData.html" title="wx.ObjectRefData" alt="" coords="33,5,171,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.adv.GIFDecoder.__init__`                                              
:meth:`~wx.adv.GIFDecoder.Clone`                                                 Create a copy of this decoder.
:meth:`~wx.adv.GIFDecoder.ConvertToImage`                                        Convert given frame to  :ref:`wx.Image`.
:meth:`~wx.adv.GIFDecoder.DoCanRead`                                             Checks the signature of the data in the given stream and returns ``True`` if it appears to be a valid animation format recognized by the animation decoder; this function should modify the stream current position without taking care of restoring it since  :meth:`~GIFDecoder.CanRead`   will do it.
:meth:`~wx.adv.GIFDecoder.GetDelay`                                              Return the number of milliseconds this frame should be displayed.
:meth:`~wx.adv.GIFDecoder.GetDisposalMethod`                                     What should be done after displaying this frame.
:meth:`~wx.adv.GIFDecoder.GetFramePosition`                                      
:meth:`~wx.adv.GIFDecoder.GetFrameSize`                                          
:meth:`~wx.adv.GIFDecoder.GetTransparentColour`                                  The transparent colour for this frame, if any, or  ``NullColour`` .
:meth:`~wx.adv.GIFDecoder.GetType`                                               Return the animation type this decoder implements.
:meth:`~wx.adv.GIFDecoder.Load`                                                  Load the animation image frames from the given stream.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.adv.GIFDecoder.Type`                                                  See :meth:`~wx.adv.GIFDecoder.GetType`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.adv.GIFDecoder(AnimationDecoder)

   **Possible constructors**::

       GIFDecoder()
       
   
   An animation decoder supporting animated ``GIF`` files.



   .. method:: __init__(self)






   .. method:: Clone(self)

      Create a copy of this decoder.                  

      :rtype: :ref:`wx.adv.AnimationDecoder`








   .. method:: ConvertToImage(self, frame, image)

      Convert given frame to  :ref:`wx.Image`.                   


      :param `frame`: 
      :type `frame`: int
      :param `image`: 
      :type `image`: wx.Image




      :rtype: `bool`








   .. method:: DoCanRead(self, stream)

      Checks the signature of the data in the given stream and returns ``True`` if it appears to be a valid animation format recognized by the animation decoder; this function should modify the stream current position without taking care of restoring it since  :meth:`CanRead`   will do it.                   


      :param `stream`: 
      :type `stream`: wx.InputStream




      :rtype: `bool`








   .. method:: GetDelay(self, frame)

      Return the number of milliseconds this frame should be displayed.                  

      If -1 is returned then the frame must be displayed forever.                  


      :param `frame`: 
      :type `frame`: int




      :rtype: `long`








   .. method:: GetDisposalMethod(self, frame)

      What should be done after displaying this frame.                  


      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`wx.adv.AnimationDisposal`








   .. method:: GetFramePosition(self, frame)




      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Point`








   .. method:: GetFrameSize(self, frame)




      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Size`








   .. method:: GetTransparentColour(self, frame)

      The transparent colour for this frame, if any, or  ``NullColour`` .                   


      :param `frame`: 
      :type `frame`: int




      :rtype: :ref:`Colour`








   .. method:: GetType(self)

      Return the animation type this decoder implements.                  

      :rtype: :ref:`wx.adv.AnimationType`








   .. method:: Load(self, stream)

      Load the animation image frames from the given stream.                  


      :param `stream`: 
      :type `stream`: wx.InputStream




      :rtype: `bool`








   .. attribute:: Type

      See :meth:`~wx.adv.GIFDecoder.GetType`

