MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / set_BackGround

Function set_BackGround

GANCode/mainWindow.py:57–62  ·  view source on GitHub ↗
(image_path, root = root)

Source from the content-addressed store, hash-verified

55#这里需要将tkImage设置为全局变量,不然显示不图片
56tkImage=''
57def set_BackGround(image_path, root = root):
58 global tkImage
59 canvas = Canvas_(root)
60 img = cv2.imread(image_path)
61 tkImage = showImage(img)
62 canvas.create_image(0, 0, anchor='nw', image=tkImage)
63
64#关闭主界面时弹出的确认窗口
65def closeEvent(root):

Callers 1

mainWindow.pyFile · 0.70

Calls 2

Canvas_Function · 0.70
showImageFunction · 0.70

Tested by

no test coverage detected