imshow() python only shows titlebar strip [closed]

asked 2017-05-29 02:04:07 -0600

rjpj98 gravatar image

I have been itching my head over this question since yesterday. I have tried and tried but to no avail. So here is my code:

import cv2

img = cv2.imread('new.bmp')

cv2.imshow('FRAME', img)



From what I have gathered on the internet, this is supposed to display the image 'new.bmp' in a window called'FRAME'. But all that happens is this!. Can anyone help me?

Link to my screenshot:

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-18 04:45:33.159341


I don't know python and mac but first thing to check in that sort of problem is image size after imread

LBerger gravatar imageLBerger ( 2017-05-29 02:17:27 -0600 )edit

I had tried it and it is/was working.Only imshow doesn't work.I want to look into the code that is inside imshow() function. Boy is this driving me nuts.

rjpj98 gravatar imagerjpj98 ( 2017-05-29 03:42:38 -0600 )edit

I confirm that this problem is intrinsic to the HEAD macOS implementation of imshow. A possible workaround is to explicitly size or resize the window.

olerohne gravatar imageolerohne ( 2017-05-29 13:15:23 -0600 )edit

may be this old post can help you

LBerger gravatar imageLBerger ( 2017-05-29 14:33:03 -0600 )edit

I was facing a similar issue a couple days ago and here's how I resolved it. Don't forget to upvote the answer if it helps resolve your issue :)

eshirima gravatar imageeshirima ( 2017-06-20 07:09:04 -0600 )edit