Avoid using user-controlled format strings passed into 'sprintf', 'printf' and 'vsprintf'. These functions put you at risk of buffer overflow vulnerabilities through the use of format string exploits. Instead, use 'snprintf' and 'vsnprintf'.
sprintf( comment, "Automatically converted from %s, window size = %dx%d", argv[2], size.width, size.height );