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¶Convert file |
|
Creates a square RGB checkered bitmap using the two specified colors. |
|
Classes Summary¶
|
|
|
|
Panel() |
|
Window() |
ConvertBMP(file_nm)¶Convert file
file_nm (string) – path to file
wx.Image or BAD_IMAGE
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
blocksize (int) – the number of pixels in each solid color square
ntiles1 (int) – the number of tiles along width and height. Each tile is 2x2 blocks.
rbg0 – the first color, as 3-character bytes object.
rgb1 – the second color, as 3-character bytes object. If only 1 character is provided, it is treated as a grey value.
GetNamedBitmap(name)¶