wx.lib.imagebrowser¶This module provides the ImageDialog which allows to view and select
an image.
The wx.ImageDialog allows the user to view images and select one.
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()
Functions Summary¶ConvertBMP |
Convert file |
GetCheckeredBitmap |
Creates a square RGB checkered bitmap using the two specified colors. |
GetNamedBitmap |
Classes Summary¶FindFiles |
|
ImageDialog |
wx.ImageDialog derived from Dialog allows the user |
ImagePanel |
|
ImageView |
ConvertBMP(file_nm)¶Convert file
| Parameters: | file_nm (string) – path to file |
|---|---|
| Returns: | wx.Image or BAD_IMAGE |
GetCheckeredBitmap(blocksize=8, ntiles=4, rgb0='xFF', rgb1='xCC')¶Creates a square RGB checkered bitmap using the two specified colors.
The bitmap returned will have width = height = blocksize*ntiles*2
| Parameters: |
|
|---|---|
| Returns: |
GetNamedBitmap(name)¶