Skip to content

Commit bdc0224

Browse files
Janne Härkönenyanne
authored andcommitted
suppress libpng warnings on load
1 parent 2676125 commit bdc0224

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/robotide/widgets/images.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ def get_image_by_name(self, name):
5959

6060
def _load_image(self, name):
6161
path = self._get_img_path(name)
62-
return wx.Image(path, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
62+
noLog = wx.LogNull()
63+
# Suppress warnings generated by recent libpng versions.
64+
# The png files themselves are most likely ok.
65+
img = wx.Image(path, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
66+
del noLog
67+
return img
6368

6469
def _get_img_path(self, name):
6570
return os.path.join(self._BASE, name)

0 commit comments

Comments
 (0)