.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. module:: wx.lib.imagebrowser

.. currentmodule:: wx.lib.imagebrowser

.. highlight:: python



.. _wx.lib.imagebrowser:

==========================================================================================================================================
|phoenix_title|  **wx.lib.imagebrowser**
==========================================================================================================================================

This module provides the :class:`~lib.imagebrowser.ImageDialog` which allows to view and select
an image.


Description
===========

The :class:`wx.ImageDialog` allows the user to view images and select one.

Usage
=====

A simple usage would be::

    import wx
    import wx.lib.mixins.inspection as wit
    import wx.lib.imagebrowser as ib

    app = wit.InspectableApp()

    with ib.ImageDialog(None) as dlg:
        if dlg.ShowModal() == wx.ID_OK:
            # show the selected file
            print("You Selected File: " + dlg.GetFile())
        else:
            print("You pressed Cancel")

    app.MainLoop()


|function_summary| Functions Summary
====================================

================================================================================ ================================================================================
:func:`~wx.lib.imagebrowser.ConvertBMP`                                          Convert file
:func:`~wx.lib.imagebrowser.GetCheckeredBitmap`                                  Creates a square RGB checkered bitmap using the two specified colors.
:func:`~wx.lib.imagebrowser.GetNamedBitmap`                                      
================================================================================ ================================================================================


|


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
:ref:`~wx.lib.imagebrowser.FindFiles`                                            
:ref:`~wx.lib.imagebrowser.ImageDialog`                                          :class:`wx.ImageDialog` derived from :class:`Dialog` allows the user
:ref:`~wx.lib.imagebrowser.ImagePanel`                                           
:ref:`~wx.lib.imagebrowser.ImageView`                                            
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.imagebrowser.FindFiles
   wx.lib.imagebrowser.ImageDialog
   wx.lib.imagebrowser.ImagePanel
   wx.lib.imagebrowser.ImageView





Functions
------------

.. function:: ConvertBMP(file_nm)

   Convert file
   
   :param string `file_nm`: path to file
   
   :return: :class:`wx.Image` or BAD_IMAGE


.. function:: GetCheckeredBitmap(blocksize=8, ntiles=4, rgb0=b'\xFF', rgb1=b'\xCC')

   Creates a square RGB checkered bitmap using the two specified colors.
   
   The bitmap returned will have width = height = blocksize*ntiles*2
   
   :param int `blocksize`:  the number of pixels in each solid color square
   :param int `ntiles1`:  the number of tiles along width and height.  Each
       tile is 2x2 blocks.
   :param `rbg0`: the first color, as 3-character bytes object.
   :param `rgb1`: the second color, as 3-character bytes object. If only 1
       character is provided, it is treated as a grey value.
   
   :return: :class:`wx.Bitmap`


.. function:: GetNamedBitmap(name)


