Does the latest OpenCV handle PNG files *properly*??
For a long time, I have tried to write a very simple OpenCV application, using variations of the code below. I prefer the PNG graphics format, but the code works erratically: sometimes I get a line, sometimes I get a black (empty) rectangle. If I use JPG or BMP, the program works fine.
TIA,
-Ramon
ps: My current version is OpenCV 2.1
IplImage* image = cvCreateImage(cvSize(int(8.5x72), 11x72), IPL_DEPTH_16U, 4);
cvLine(image, cvPoint(22, 44), cvPoint(456, 700), CV_RGB(255, 0, 0));
cvSaveImage("my_image.png", image);
OpenCV 2.1 is not the latest.
> OpenCV 2.1 is not the latest.
I upgraded to Version 2.4.0 (2.4.2 won't build on Linux) and the inability to deal with PNG files is still present.