瀏覽代碼

Changed the output to go to stdout to more conform to the unix philosophy

Dan Hintz - Arch 5 年之前
父節點
當前提交
318714c0fe
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      frames2img.c

+ 3 - 3
frames2img.c

@@ -35,8 +35,8 @@ int main(int argc, char **argv){
 		free(buffer);
 		png_image_free(&image);
 
-		fprintf(stdout, "%d%% Complete\r", ++percent * 100 / argc);
-		fflush(stdout);
+		fprintf(stderr, "%d%% Complete\r", ++percent * 100 / argc);
+		fflush(stderr);
 	}
 	uint8 *imgPointer = malloc(height*width*3*sizeof(uint8 *));
 
@@ -55,7 +55,7 @@ int main(int argc, char **argv){
 	output.width = width;
 	output.height = height;
 
-	png_image_write_to_file(&output, imageFileName, 0, imgPointer, 0, NULL);
+	png_image_write_to_stdio(&output, stdout, 0, imgPointer, 0, NULL);
 
 	free(imgPointer);
 	free(frames);