imshow does not handle title correctly on Windows (C/C++) (Bug #3819)


Added by Josiah Yoder over 10 years ago. Updated over 10 years ago.


Status:Cancelled Start date:2014-07-17
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected version:2.4.9 (latest release) Operating System:Windows
Difficulty: HW Platform:x64
Pull request:

Description

The following code shows a window, but with garbled text in the title:
#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>

int _tmain(int argc, _TCHAR* argv[]) {
char * filename = "Desert.jpg";
cv::Mat image = cvLoadImage(filename, CV_LOAD_IMAGE_COLOR);
if(image.data == NULL) {
std::cout << "Warning: Could not open file: \""<< filename << "\"" << std::endl;
} else {
cv::waitKey(0);
}
return 0;
}

If
cv::imshow("main", image);
is replaced with
IplImage iplImage = image;
cvShowImage("main", &iplImage);
the code words correctly.


Associated revisions

Revision 79a77cb9
Added by Vadim Pisarevsky almost 11 years ago

Merge pull request #3819 from MSOpenTech:readme-24

History

Updated by Josiah Yoder over 10 years ago

Sorry... classic error...

Both examples work when I debug and use the debug libraries. (I was using the non-debug libraries in the example above.)

  • Status changed from New to Done

Updated by Steven Puttemans over 10 years ago

  • Status changed from Done to Cancelled

Also available in: Atom PDF