Skip to content

Commit

Permalink
use pyqt for showing image
Browse files Browse the repository at this point in the history
for full screen
  • Loading branch information
Hironsan committed Sep 13, 2016
1 parent b649e70 commit d605fcf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion image_show.py
@@ -1,8 +1,12 @@
# -*- coding: utf-8 -*-
import sys

import cv2
from PyQt4 import QtGui


def show_image(image_path='pycharm.png'):
def show_image(image_path='s_pycharm.jpg'):
"""
# 画像の読み込み
RGB = 1
img = cv2.imread(image_path, RGB)
Expand All @@ -16,6 +20,14 @@ def show_image(image_path='pycharm.png'):
# 作成したウィンドウを全て破棄
cv2.destroyAllWindows()
"""

app = QtGui.QApplication(sys.argv)
pixmap = QtGui.QPixmap(image_path)
screen = QtGui.QLabel()
screen.setPixmap(pixmap)
screen.showFullScreen()
sys.exit(app.exec_())


if __name__ == '__main__':
Expand Down
Binary file added s_pycharm.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d605fcf

Please sign in to comment.