I’m new to OpenCV 2.4.2, and write a simple program to display an image.
The image is:

And the code is:
include "highgui.h"
int main(int argc, char** argv) {
IplImage* img = cvLoadImage("logo.png");
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE);
cvShowImage("Example1", img);
cvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("Example1");
return 0;
}
And the result:

You can see there is a big grey border on the right. Why there it is, and how to fix it?
That is the smallest window possible since window should occupy 3 buttons at the top. It will be OK if you enlarge the image.