imshow does not handle title correctly on Windows (C/C++) (Bug #3819)
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
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