Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson318 committed Apr 27, 2023
1 parent 0fc718b commit 69e39ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def setup(app):
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.imgmath', 'nbsphinx']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.imgmath']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -134,7 +134,7 @@ def setup(app):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand Down
8 changes: 6 additions & 2 deletions imshowtk/imshowtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def bitmap_to_photo(bitmap, subsample = 1):
:param bitmap: The bitmap image, taken from opencv as a
3 channel numpy array
:param subsample: You can optionally subsample the image
:param subsample: You can optionally subsample the image
which might be useful if you want it to run faster. A value of
n will give an nxn speed up as we use 2 loops to convert the image.
"""
Expand All @@ -40,7 +40,7 @@ def bitmap_to_photo(bitmap, subsample = 1):

class ImshowTk():
"""
Creates a window using TkInter, into which we can
Creates a window using TkInter, into which we can
place an opencv image. Conceived as a zero dependency alternative
to opencv's imshow window, for when we want to use opencv-headless
or avoid conflict with Qt.
Expand Down Expand Up @@ -92,6 +92,10 @@ def imshow(self, frame):
try:
self.canvas.create_image(0, 0, anchor=NW, image=self.image)
except TclError as error_msg:
#this seems to happen when we're not running inside
#a persistent application (i.e. CI testing),
#self.image is getting deleted before we can use it.
#We haven't seen it in practice.
print ("Ignoring Tk error: ", str(error_msg))
return

Expand Down

0 comments on commit 69e39ba

Please sign in to comment.