
ExternalLibraries
=================

``_from_raw_string``
--------------------

``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex] **_from_raw_string** (``Point`` *offset*, ``Dim`` *dim*, int *pixel_type*, int *storage_type*, object *data_string*)


:Returns: ``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex]
:Category: ExternalLibraries
:Defined in: string_io.py
:Author: Alex Cobb


Instantiates an image from binary data in a Python string.

Requires a copying operation;  may fail for very large images.

This function is not intended to be used directly.  To move data
to/from Numeric/numarray/PIL, use the functions in numeric_io.py,
numarray_io.py and pil_io.py respectively.


``_to_raw_string``
------------------

object **_to_raw_string** ()


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex]
:Returns: object
:Category: ExternalLibraries
:Defined in: string_io.py
:Author: Alex Cobb


Returns the image's binary data as a Python string.

Requires a copying operation;  may fail for very large images.

This function is not intended to be used directly.  To move data
to/from Numeric/numarray/PIL, use the functions in numeric_io.py,
numarray_io.py and pil_io.py respectively.


``to_buffer``
-------------

**to_buffer** (object *Buffer*)


:Operates on: ``Image`` [OneBit|GreyScale|Grey16|RGB|Float|Complex]
:Category: ExternalLibraries
:Defined in: gui_support.py
:Author: Michael Droettboom and Karl MacMillan


Encodes the image into a 'buffer' required by wx.Image.
(i.e. 8-bit RGB triplets). If you need to convert a gamera image
*scaled_image* to a wx.Bitmap, you can do so as follows:

.. code:: Python
    
  wximg = wx.EmptyImage(scaled_image.ncols, scaled_image.nrows)
  scaled_image.to_buffer(wximg.GetDataBuffer())
  wxbmp = wx.BitmapFromImage(wximg)


